Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TensorHandle (0.2 sec)

  1. tensorflow/c/eager/c_api_test_util.cc

    using tensorflow::string;
    using tensorflow::tstring;
    
    TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) {
      float data[] = {value};
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, TF_FLOAT, nullptr, 0, status);
      memcpy(TF_TensorData(t), &data[0], TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 23.5K bytes
    - Viewed (2)
  2. tensorflow/c/eager/c_api_experimental.h

    // returned will be on the device in which the TFE_TensorHandle resides (so e.g.
    // for a GPU tensor this will return a pointer to GPU memory). The pointer is
    // only guaranteed to be valid until TFE_DeleteTensorHandle is called on this
    // TensorHandle. Only supports POD data types.
    TF_CAPI_EXPORT extern void* TFE_TensorHandleDevicePointer(TFE_TensorHandle*,
                                                              TF_Status*);
    
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Feb 21 22:37:46 GMT 2024
    - 39.5K bytes
    - Viewed (0)
  3. tensorflow/c/eager/dlpack.cc

    // Gets tensor from eager tensor handle.
    const Tensor* GetTensorFromHandle(TFE_TensorHandle* h, TF_Status* status) {
      if (h == nullptr) {
        status->status = tensorflow::errors::InvalidArgument("Invalid handle");
        return nullptr;
      }
      tensorflow::TensorHandle* handle =
          tensorflow::TensorHandleFromInterface(tensorflow::unwrap(h));
      if (handle->Type() != TensorHandle::LOCAL) {
        status->status = tensorflow::errors::InvalidArgument(
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api.cc

    }
    
    TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t, TF_Status* status) {
      tensorflow::Tensor tensor;
      status->status = tensorflow::TF_TensorToTensor(t, &tensor);
      if (!status->status.ok()) return nullptr;
    
      return tensorflow::wrap(tensorflow::TensorHandle::CreateLocalHandle(tensor));
    }
    
    void TFE_DeleteTensorHandle(TFE_TensorHandle* h) {
      if (h == nullptr) return;
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  5. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

    std::unique_ptr<ParallelTensor> ParallelDevice::CopyToParallelDevice(
        TFE_Context* context, TFE_TensorHandle* tensor, TF_Status* status) const {
      std::vector<TensorHandlePtr> components;
      components.reserve(underlying_devices_.size());
      for (const std::string& underlying_device_name : underlying_devices_) {
        TFE_TensorHandle* t = TFE_TensorHandleCopyToDevice(
            tensor, context, underlying_device_name.c_str(), status);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  6. tensorflow/c/eager/c_api_distributed_test.cc

      const char task2_name[] = "/job:localhost/replica:0/task:2/device:CPU:0";
    
      // Create one variable per task.
      TFE_TensorHandle* h0 = TestVariable(ctx, 1.0, task1_name);
      TFE_TensorHandle* h1 = TestVariable(ctx, 2.0, task2_name);
      TFE_TensorHandle* h2 = TestVariable(ctx, 3.0, task0_name);
    
      // Add a sync point to make sure that variables have been initialized
      // before the function execution starts.
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api_experimental.cc

      return new TF_Tensor{t};
    }
    
    TFE_TensorHandle* TFE_NewTensorHandleFromTensor(TFE_Context* ctx, TF_Tensor* t,
                                                    TF_Status* status) {
      return tensorflow::wrap(
          tensorflow::unwrap(ctx)->CreateLocalHandle(t->tensor));
    }
    
    TFE_TensorHandle* TFE_CreatePackedTensorHandle(TFE_Context* ctx,
                                                   TFE_TensorHandle** handles,
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
  8. tensorflow/c/eager/BUILD

        ],
    )
    
    cc_library(
        name = "tfe_tensorhandle_internal",
        hdrs = ["tfe_tensorhandle_internal.h"],
        visibility = [
            "//tensorflow:internal",
        ],
        deps = [
            ":immediate_execution_tensor_handle",
            "//tensorflow/c:conversion_macros",
        ],
    )
    
    cc_header_only_library(
        name = "tfe_tensorhandle_internal_hdrs_only",
        extra_deps = [
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 33.3K bytes
    - Viewed (0)
  9. tensorflow/c/c_api_experimental.cc

    #include "tensorflow/c/eager/c_api.h"
    #include "tensorflow/c/eager/c_api_internal.h"
    #include "tensorflow/c/eager/tfe_context_internal.h"
    #include "tensorflow/c/eager/tfe_op_internal.h"
    #include "tensorflow/c/eager/tfe_tensorhandle_internal.h"
    #include "tensorflow/c/tf_buffer_internal.h"
    #include "tensorflow/compiler/jit/flags.h"
    #include "tensorflow/core/common_runtime/eager/attr_builder.h"
    #include "tensorflow/core/common_runtime/eager/context.h"
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  10. tensorflow/c/BUILD

            "//tensorflow/c/eager:c_api",
            "//tensorflow/c/eager:c_api_internal",
            "//tensorflow/c/eager:tfe_context_internal",
            "//tensorflow/c/eager:tfe_op_internal",
            "//tensorflow/c/eager:tfe_tensorhandle_internal",
            "//tensorflow/compiler/jit:flags",
            "//tensorflow/compiler/jit:get_compiler_ir",
            "//tensorflow/core:core_cpu",
            "//tensorflow/core:framework",
            "//tensorflow/core:lib",
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 27 18:00:18 GMT 2024
    - 30.3K bytes
    - Viewed (0)
Back to top