MCPcopy Create free account
hub / github.com/Samsung/ONE / writeInputTensor

Method writeInputTensor

compiler/luci-interpreter/src/Interpreter.cpp:102–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100Interpreter::~Interpreter() = default;
101
102void Interpreter::writeInputTensor(const luci::CircleInput *input_node, const void *data,
103 size_t data_size)
104{
105 Tensor *tensor = _runtime_module->getInputTensors()[input_node->index()];
106 if (tensor == nullptr)
107 {
108 const std::string &name = input_node->name();
109 throw std::runtime_error("Cannot find tensor for input node named \"" + name + "\".");
110 }
111 if (data != nullptr)
112 tensor->writeData(data, data_size);
113}
114
115void Interpreter::readOutputTensor(const luci::CircleOutput *output_node, void *data,
116 size_t data_size)

Callers 14

runMethod · 0.80
compute_outputsFunction · 0.80
profileRawDataMethod · 0.80
profileDataMethod · 0.80
profileDataInParallelMethod · 0.80
interpretFunction · 0.80
entryFunction · 0.80
entryFunction · 0.80

Calls 4

getInputTensorsMethod · 0.80
writeDataMethod · 0.80
indexMethod · 0.45
nameMethod · 0.45

Tested by 2

entryFunction · 0.64
entryFunction · 0.64