ONE - On-device Neural Engine
|
Serializer of network parameters for soft backend. More...
#include <SBSerializer.h>
Public Member Functions | |
void | visit (mir::ops::AbsOp &op) override |
void | visit (mir::ops::AddOp &op) override |
void | visit (mir::ops::AvgPool2DOp &op) override |
void | visit (mir::ops::BroadcastOp &op) override |
void | visit (mir::ops::CappedReluOp &op) override |
void | visit (mir::ops::ConcatOp &op) override |
void | visit (mir::ops::ConstantOp &op) override |
void | visit (mir::ops::Conv2DOp &op) override |
void | visit (mir::ops::DeConv2DOp &op) override |
void | visit (mir::ops::DepthwiseConv2DOp &op) override |
void | visit (mir::ops::DivOp &op) override |
void | visit (mir::ops::EluOp &op) override |
void | visit (mir::ops::FullyConnectedOp &op) override |
void | visit (mir::ops::GatherOp &op) override |
void | visit (mir::ops::InputOp &op) override |
void | visit (mir::ops::LeakyReluOp &op) override |
void | visit (mir::ops::MaxOp &op) override |
void | visit (mir::ops::MaxPool2DOp &op) override |
void | visit (mir::ops::MulOp &op) override |
void | visit (mir::ops::OutputOp &op) override |
void | visit (mir::ops::PadOp &op) override |
void | visit (mir::ops::ReduceMeanOp &op) override |
void | visit (mir::ops::ReluOp &op) override |
void | visit (mir::ops::ReshapeOp &op) override |
void | visit (mir::ops::ResizeOp &op) override |
void | visit (mir::ops::SigmoidOp &op) override |
void | visit (mir::ops::SliceOp &op) override |
void | visit (mir::ops::SoftmaxOp &op) override |
void | visit (mir::ops::SqrtOp &op) override |
void | visit (mir::ops::SqueezeOp &op) override |
void | visit (mir::ops::SubOp &op) override |
void | visit (mir::ops::TanhOp &op) override |
void | visit (mir::ops::TransposeOp &op) override |
void | serialize (std::vector< std::unique_ptr< sir::Action > > &inference_sequence) |
const std::vector< char > & | getBuffer () const |
uint32_t | getFormatVersion () const |
uint32_t | getModelHash () const |
Public Member Functions inherited from mir::IVisitor | |
virtual | ~IVisitor ()=default |
Protected Member Functions | |
void | visit_fallback (mir::Operation &op) override |
Serializer of network parameters for soft backend.
Serializer class responsible for serialization of given computational graph parameters and binding of inference operations to this data. It owns buffer that contains serialized data. To serialize data serialize
method should be called with sequence from ModelAnalyzer object To gather this vector use getBuffer
method. Objects of this class are one-off and not designed to serialize more than one IR
Definition at line 41 of file SBSerializer.h.
|
inline |
Definition at line 80 of file SBSerializer.h.
|
inline |
Definition at line 82 of file SBSerializer.h.
|
inline |
Definition at line 84 of file SBSerializer.h.
void nnc::Serializer::serialize | ( | std::vector< std::unique_ptr< sir::Action > > & | inference_sequence | ) |
Definition at line 355 of file SBSerializer.cpp.
References mir::Operation::accept(), nnc::sir::Action::callFunction, and nnc::sir::CallFunction::mirOp.
Referenced by nnc::CPPCodeGenerator::run().
|
override |
Definition at line 371 of file SBSerializer.cpp.
References nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 377 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 170 of file SBSerializer.cpp.
References mir::ops::AvgPool2DOp::getIncludePad(), mir::Operation::getOutputShape(), mir::ops::AvgPool2DOp::getStrides(), mir::ops::AvgPool2DOp::getWindowSize(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 205 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 211 of file SBSerializer.cpp.
References mir::ops::CappedReluOp::getCap(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 129 of file SBSerializer.cpp.
References mir::ops::ConcatOp::getAxis(), mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 222 of file SBSerializer.cpp.
References mir::ops::ConstantOp::getValue(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 138 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), mir::ops::Conv2DOp::getStrides(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 260 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), mir::ops::DeConv2DOp::getStrides(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 150 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), mir::ops::DepthwiseConv2DOp::getStrides(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 384 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 254 of file SBSerializer.cpp.
References mir::ops::EluOp::getAlpha(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 199 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 337 of file SBSerializer.cpp.
References mir::ops::GatherOp::getAxis(), mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 217 of file SBSerializer.cpp.
|
override |
Definition at line 348 of file SBSerializer.cpp.
References mir::ops::LeakyReluOp::getAlpha(), mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 391 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 185 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), mir::ops::MaxPool2DOp::getStrides(), mir::ops::MaxPool2DOp::getWindowSize(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 398 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 366 of file SBSerializer.cpp.
|
override |
Definition at line 278 of file SBSerializer.cpp.
References mir::Operation::getInputShape(), mir::Operation::getOutputShape(), mir::ops::PadOp::getPaddingAfter(), mir::ops::PadOp::getPaddingBefore(), mir::ops::PadOp::getPaddingValue(), nnc::sir::CallFunction::paramStartOffset, and mir::Shape::rank().
|
override |
Definition at line 316 of file SBSerializer.cpp.
References mir::ops::ReduceOp::getKeepDims(), mir::Operation::getOutputShape(), mir::ops::ReduceOp::getReductionDims(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 228 of file SBSerializer.cpp.
References nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 234 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 309 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 346 of file SBSerializer.cpp.
References nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 240 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), mir::ops::SliceOp::getSizes(), mir::ops::SliceOp::getStarts(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 162 of file SBSerializer.cpp.
References mir::ops::SoftmaxOp::getAxis(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 303 of file SBSerializer.cpp.
References nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 272 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 405 of file SBSerializer.cpp.
References mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 248 of file SBSerializer.cpp.
References nnc::sir::CallFunction::paramStartOffset.
|
override |
Definition at line 324 of file SBSerializer.cpp.
References mir::ops::TransposeOp::getAxisOrder(), mir::Operation::getOutputShape(), and nnc::sir::CallFunction::paramStartOffset.
|
overrideprotectedvirtual |
Reimplemented from mir::Visitor.
Definition at line 412 of file SBSerializer.cpp.