- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for TFE_TensorHandleResolve (0.27 sec)
-
tensorflow/c/eager/c_api_test.cc
TFE_DeleteContextOptions(opts); TFE_TensorHandle* h = TestMatrixTensorHandle(ctx); EXPECT_EQ(TF_FLOAT, TFE_TensorHandleDataType(h)); TF_Tensor* t = TFE_TensorHandleResolve(h, status.get()); ASSERT_EQ(16, TF_TensorByteSize(t)); float data[4] = {0}; memcpy(&data[0], TF_TensorData(t), TF_TensorByteSize(t)); EXPECT_EQ(1.0, data[0]); EXPECT_EQ(2.0, data[1]);
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_unified_experimental_test.cc
TFE_TensorHandle* result_t = TF_AbstractTensorGetEagerTensor(result, status.get()); ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); TF_Tensor* result_tensor = TFE_TensorHandleResolve(result_t, status.get()); float* result_value = static_cast<float*>(TF_TensorData(result_tensor)); EXPECT_EQ(*result_value, 4.0); TF_DeleteTensor(result_tensor); TF_DeleteAbstractTensor(result);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 39.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental_test.cc
TFE_Execute(op, result.data(), &num_retvals, status); TFE_DeleteOp(op); ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status); ASSERT_EQ(num_retvals, 1); TF_Tensor* r = TFE_TensorHandleResolve(result[0], status); ASSERT_TRUE(TF_GetCode(status) == TF_OK) << TF_Message(status); EXPECT_EQ(*reinterpret_cast<tensorflow::int32*>(TF_TensorData(r)), 42); TFE_ContextSetExecutorForThread(ctx, old_executor);
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_distributed_test.cc
EXPECT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); ASSERT_EQ(1, num_retvals); TFE_DeleteOp(func); TFE_DeleteTensorHandle(packed_handle); TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TFE_DeleteTensorHandle(retvals[0]); float sum = 0; EXPECT_EQ(sizeof(sum), TF_TensorByteSize(t));
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/c_api_remote_test.cc
TFE_TensorHandle* retvals[1]; int num_retvals = 1; TFE_Execute(matmul, &retvals[0], &num_retvals, status); EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status); float product[4] = {0}; EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Aug 12 00:14:22 UTC 2020 - 5.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_remote_test_util.cc
auto* retval_task0 = TFE_TensorHandleCopyToDevice( retvals[0], ctx, "/job:localhost/replica:0/task:0/device:CPU:0", status); ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TF_Tensor* t = TFE_TensorHandleResolve(retval_task0, status); ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status); TFE_DeleteTensorHandle(retval_task0); float product[4] = {0}; EXPECT_EQ(sizeof(product), TF_TensorByteSize(t));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Dec 11 22:56:03 UTC 2020 - 9.1K bytes - Viewed (0) -
tensorflow/c/c_api_experimental_test.cc
TFE_OpSetAttrType(fill_op, "Tshape", TF_INT32); float five = 5.0; TFE_TensorHandle* scalar = TestScalarTensorHandle(tfe_context_, five); TF_Tensor* scalarTensor = TFE_TensorHandleResolve(scalar, status_); CHECK_EQ(TF_OK, TF_GetCode(status_)) << TF_Message(status_); CheckOutputShapes(fill_op, /* input_shapes*/ {unknown_shape(), unknown_shape()},
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Tue Jan 17 22:27:52 UTC 2023 - 13.1K bytes - Viewed (0) -
tensorflow/c/eager/c_api.h
// TensorFlow. Hence, callers should not mutate this memory (for example by // modifying the memory region pointed to by TF_TensorData() on the returned // TF_Tensor). TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h, TF_Status* status); // Create a new TFE_TensorHandle with the same contents as 'h' but placed
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/custom_device_test.cc
UnpackTensorHandle(var_value, status.get()); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> resolved_value( TFE_TensorHandleResolve(var_value_unpacked, status.get()), TF_DeleteTensor); ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get()); ASSERT_EQ(111., *static_cast<float*>(TF_TensorData(resolved_value.get())));
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Aug 27 23:39:24 UTC 2020 - 18.4K bytes - Viewed (0) -
tensorflow/c/eager/c_api_cluster_test.cc
const std::vector<float>& expected_values) { std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status( TF_NewStatus(), TF_DeleteStatus); TF_Tensor* t = TFE_TensorHandleResolve(handle, status.get()); ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get()); std::unique_ptr<float[]> actual_values(new float[expected_values.size()]);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0)