- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for TFE_NewTensorHandle (0.17 sec)
-
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.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Apr 27 21:07:00 UTC 2023 - 22.8K bytes - Viewed (0) -
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;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 23.5K bytes - Viewed (0) -
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;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 43.9K bytes - Viewed (0) -
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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0) -
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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 39.5K bytes - Viewed (0) -
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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0)