Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for TFE_NewTensorHandle (0.31 sec)

  1. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

          TF_NewTensor(TF_FLOAT, nullptr, 0, values, num_bytes, &FloatDeallocator,
                       nullptr),
          TF_DeleteTensor);
      return TensorHandlePtr(TFE_NewTensorHandle(tensor.get(), status));
    }
    
    // Creates a rank-one TFE_TensorHandle with value `v`.
    TensorHandlePtr VectorFloatTensorHandle(const std::vector<float>& v,
                                            TF_Status* status) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Jun 15 15:44:44 GMT 2021
    - 12.5K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api.h

    // placed in the memory of different devices or remote address spaces.
    typedef struct TFE_TensorHandle TFE_TensorHandle;
    
    TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t,
                                                                TF_Status* status);
    // Indicates that the caller will not be using `h` any more.
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 22.8K bytes
    - Viewed (1)
  3. tensorflow/c/eager/c_api_test_util.cc

      memcpy(TF_TensorData(t.get()), &value, TF_TensorByteSize(t.get()));
    
      std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)>
          value_handle(TFE_NewTensorHandle(t.get(), status),
                       TFE_DeleteTensorHandle);
      if (TF_GetCode(status) != TF_OK) return nullptr;
    
      TFE_OpAddInput(op, value_handle.get(), status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
    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)
  4. tensorflow/c/eager/c_api.cc

        TFE_Context* ctx) {
      return static_cast<TFE_ContextDevicePlacementPolicy>(
          tensorflow::unwrap(ctx)->GetDevicePlacementPolicy());
    }
    
    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;
    
    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/c_api_experimental_test.cc

        TF_Tensor* t =
            TF_AllocateTensor(TF_INT32, nullptr, 0, 1 * sizeof(tensorflow::int32));
        *reinterpret_cast<tensorflow::int32*>(TF_TensorData(t)) = 42;
        TFE_TensorHandle* h = TFE_NewTensorHandle(t, status);
        ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status);
        TF_DeleteTensor(t);
    
        TFE_Op* op = TFE_NewOp(ctx, "ident", status);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  6. tensorflow/c/eager/c_api_experimental.h

                                                            int num_dims,
                                                            TF_Status* status);
    
    // Given a Tensor, wrap it with a TensorHandle
    //
    // Similar to TFE_NewTensorHandle, but includes a pointer to the TFE_Context.
    // The context should be identical to that of the Tensor.
    TF_CAPI_EXPORT TFE_TensorHandle* TFE_NewTensorHandleFromTensor(
        TFE_Context* ctx, TF_Tensor* t, TF_Status* 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)
  7. tensorflow/c/eager/c_api_test.cc

          TF_AllocateTensor(TF_FLOAT, dims.data(), dims.size(), sizeof(float));
      float tensor_data[] = {1};
      memcpy(TF_TensorData(tensor), tensor_data, TF_TensorByteSize(tensor));
      TFE_TensorHandle* tensor_handle = TFE_NewTensorHandle(tensor, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TFE_OpAddInput(op, tensor_handle, status);
      TF_DeleteTensor(tensor);
      TFE_DeleteTensorHandle(tensor_handle);
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
Back to top