- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 22 for TFE_TensorHandle (0.23 sec)
-
tensorflow/c/eager/c_api_test_util.h
// on the given device. TFE_TensorHandle* TestVariable(TFE_Context* ctx, float value, const tensorflow::string& device_name = ""); // Return an add op multiplying `a` by `b`. TFE_Op* AddOp(TFE_Context* ctx, TFE_TensorHandle* a, TFE_TensorHandle* b); // Return a matmul op multiplying `a` by `b`. TFE_Op* MatMulOp(TFE_Context* ctx, TFE_TensorHandle* a, TFE_TensorHandle* b); // Return an identity op.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Jul 17 23:43:59 UTC 2023 - 7.7K bytes - Viewed (0) -
tensorflow/c/eager/c_api.h
// A handle to a tensor on a device. // // Like a TF_Tensor, a TFE_TensorHandle refers to a tensor with a value, shape, // type etc. Unlike a TF_Tensor, a TFE_TensorHandle may refer to such tensors // 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,
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.cc
TFE_DeleteContextOptions(opts); TFE_TensorHandle* input1 = TestMatrixTensorHandle(ctx); TFE_TensorHandle* input2 = TestMatrixTensorHandle(ctx); TFE_TensorHandle* dim = TestScalarTensorHandle(ctx, 0); TFE_Op* concatOp = TFE_NewOp(ctx, "Concat", status); CHECK_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TFE_TensorHandle* inputs[] = {input1, input2}; TFE_OpAddInput(concatOp, dim, status);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 20:50:20 UTC 2023 - 94.6K bytes - Viewed (0) -
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);
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
} TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_TensorHandleCopySharingTensor( TFE_TensorHandle* h, TF_Status* status) { if (h == nullptr) { status->status = tensorflow::errors::InvalidArgument("Invalid handle"); return nullptr; } tensorflow::unwrap(h)->Ref(); return h; } TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h, TF_Status* status) { if (h == 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/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);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 25.9K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device.cc
// // Since this function is used to satisfy the TFE_CustomDevice C API, // device_info is passed in using a C-style generic. It must always be a // ParallelDevice. TFE_TensorHandle* CopyToParallelDevice(TFE_Context* context, TFE_TensorHandle* tensor, TF_Status* status, void* device_info) { TF_SetStatus( status, TF_UNIMPLEMENTED,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Mon Oct 21 04:14:14 UTC 2024 - 18.3K bytes - Viewed (0) -
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.
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 23.4K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_test.cc
{ // Try to pass a ParallelTensor to TPUReplicatedInput std::array<TFE_TensorHandle*, 1> correct_components{value_one.get()}; TensorHandlePtr combined_value = CreatePerDeviceValues( context.get(), correct_components, device_name, status.get()); ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get()); std::array<TFE_TensorHandle*, 1> incorrect_components{combined_value.get()};
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Aug 06 23:56:17 UTC 2024 - 29.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
/*is_async=*/async, /*enable_streaming_enqueue=*/true, /*in_flight_nodes_limit=*/0); TFE_ContextSetExecutorForThread(ctx, executor); TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); TFE_Op* matmul = MatMulOp(ctx, m, m); TFE_TensorHandle* retvals[2] = {nullptr, nullptr}; int num_retvals = 2; TFE_Execute(matmul, &retvals[0], &num_retvals, status); EXPECT_EQ(1, num_retvals);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 03 03:14:26 UTC 2023 - 31.5K bytes - Viewed (0)