MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / create_tensor

Method create_tensor

src/graph/backends/CL/CLDeviceBackend.cpp:168–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168std::unique_ptr<ITensorHandle> CLDeviceBackend::create_tensor(const Tensor &tensor)
169{
170 // Get tensor descriptor
171 const TensorDescriptor &tensor_desc = tensor.desc();
172 ARM_COMPUTE_ERROR_ON(tensor_desc.target != Target::CL);
173
174 // Create backend tensor handle
175 TensorInfo info(tensor_desc.shape, 1, tensor_desc.data_type, tensor_desc.quant_info);
176 info.set_data_layout(tensor_desc.layout);
177
178 return std::make_unique<CLTensorHandle>(info);
179}
180
181std::unique_ptr<ITensorHandle>
182CLDeviceBackend::create_subtensor(ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent)

Callers 1

configure_all_tensorsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected