MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / CreateTensor

Function CreateTensor

tensorflow/lite/delegates/gpu/cl/tensor.cc:194–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194Status CreateTensor(const CLContext& context, const CLDevice& device, int width,
195 int height, int channels, DataType data_type,
196 TensorStorageType storage_type, Tensor* result) {
197 CLMemory memory;
198 RETURN_IF_ERROR(AllocateTensorMemory(context, device, width, height, channels,
199 data_type, storage_type, &memory));
200 *result = Tensor(memory.Release(), width, height, channels, data_type,
201 storage_type);
202 return OkStatus();
203}
204
205Status AllocateTensorMemory(const CLContext& context, const CLDevice& device,
206 int width, int height, int channels,

Callers 3

AllocateMemoryMethod · 0.70
ExecuteGPUOperationFunction · 0.50

Calls 4

AllocateTensorMemoryFunction · 0.85
OkStatusFunction · 0.85
TensorClass · 0.70
ReleaseMethod · 0.45

Tested by 1

ExecuteGPUOperationFunction · 0.40