153 auto graph = context->
graph();
154 auto reader = context->
reader();
155 const auto tensors = reader->
tensors();
164 const auto r_buffers = reader->buffers();
171 throw std::runtime_error(
"CircleConst: Circle file with invalid extended Buffer.");
179 if (
r_buffer->size() >= std::numeric_limits<uint32_t>::max())
182 throw std::runtime_error(
"CircleConst: Circle file with invalid extended Buffer.");
237 if (buffer.
empty() && num_elements > 0)
243 auto const_node = graph->nodes()->create<
CircleConst>();
246 INFO(l) <<
"[luci] NodeFinder const_node(" <<
tensor_index <<
") -> " << const_node <<
" "
248 if (num_elements > 0)
252 case loco::DataType::FLOAT32:
256 case loco::DataType::FLOAT16:
260 case loco::DataType::U4:
264 case loco::DataType::U8:
268 case loco::DataType::S4:
272 case loco::DataType::S8:
276 case loco::DataType::S16:
280 case loco::DataType::S32:
284 case loco::DataType::S64:
288 case loco::DataType::BOOL:
292 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.