- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for TFE_AllocateHostTensor (0.17 sec)
-
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_experimental.cc
buf->data = data; buf->length = str.length(); buf->data_deallocator = [](void* data, size_t length) { tensorflow::port::Free(data); }; status->status = absl::OkStatus(); } TF_Tensor* TFE_AllocateHostTensor(TFE_Context* ctx, TF_DataType dtype, const int64_t* dims, int num_dims, TF_Status* status) { std::vector<int64_t> dimvec(num_dims);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 35.9K bytes - Viewed (0) -
tensorflow/c/eager/c_api_experimental.h
// Allocate and return a new Tensor on the host. // // The caller must set the Tensor values by writing them to the pointer returned // by TF_TensorData with length TF_TensorByteSize. TF_CAPI_EXPORT extern TF_Tensor* TFE_AllocateHostTensor(TFE_Context* ctx, TF_DataType dtype, const int64_t* dims,
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Wed Feb 21 22:37:46 UTC 2024 - 39.5K bytes - Viewed (0)