169 auto graph = context->
graph();
170 auto reader = context->
reader();
171 const auto tensors = reader->
tensors();
180 const auto r_buffers = reader->buffers();
187 throw std::runtime_error(
"CircleConst: Circle file with invalid extended Buffer.");
195 if (
r_buffer->size() >= std::numeric_limits<uint32_t>::max())
198 throw std::runtime_error(
"CircleConst: Circle file with invalid extended Buffer.");
253 if (buffer.
empty() && num_elements > 0)
259 auto const_node = graph->nodes()->create<
CircleConst>();
262 INFO(l) <<
"[luci] NodeFinder const_node(" <<
tensor_index <<
") -> " << const_node <<
" "
264 if (num_elements > 0)
268 case loco::DataType::FLOAT32:
272 case loco::DataType::FLOAT16:
276 case loco::DataType::U4:
280 case loco::DataType::U8:
284 case loco::DataType::S4:
288 case loco::DataType::S8:
292 case loco::DataType::S16:
296 case loco::DataType::S32:
300 case loco::DataType::S64:
304 case loco::DataType::BOOL:
308 case loco::DataType::STRING:
Class to store context to build loco graph IR from TensorFlow.
IndexTensorOutputs * tensoroutputs()
void copy_tensor_attributes(const circle::Tensor *tensor, CircleNode *node)
Copy common tensor attributes such as name, type, etc. to node.