ONE - On-device Neural Engine
|
#include <PermuteLayer.h>
Public Member Functions | |
PermuteLayer (const std::vector< ITensor * > &src_tensors, const std::vector< ITensor * > &dst_tensors, const std::vector< ir::PermuteType > &types, const std::shared_ptr< ExternalContext > &external_context) | |
void | optimize () override |
void | run () override |
Public Member Functions inherited from onert::exec::IPermuteFunction | |
virtual void | prepare () override |
Public Member Functions inherited from onert::exec::IFunction | |
virtual | ~IFunction ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from onert::exec::IPermuteFunction | |
void | permute (backend::ITensor *src_tensor, backend::ITensor *dst_tensor, size_t rank, std::vector< size_t > &src_offsets, std::vector< size_t > &dst_offsets, const ir::PermuteType &permute_type) |
const std::type_info & | underlying_type (ir::DataType type) const |
Protected Attributes inherited from onert::exec::IPermuteFunction | |
std::vector< backend::ITensor * > | _src_tensors |
std::vector< backend::ITensor * > | _dst_tensors |
std::vector< std::vector< size_t > > | _src_tensors_offsets |
std::vector< std::vector< size_t > > | _dst_tensors_offsets |
std::vector< ir::PermuteType > | _permute_types |
std::unordered_map< const backend::ITensor *, std::vector< uint8_t > > | _buffers_map |
Definition at line 34 of file PermuteLayer.h.
onert::backend::builtin::kernel::PermuteLayer::PermuteLayer | ( | const std::vector< ITensor * > & | src_tensors, |
const std::vector< ITensor * > & | dst_tensors, | ||
const std::vector< ir::PermuteType > & | types, | ||
const std::shared_ptr< ExternalContext > & | external_context | ||
) |
Definition at line 30 of file PermuteLayer.cc.
References onert::exec::IPermuteFunction::_dst_tensors, onert::exec::IPermuteFunction::_dst_tensors_offsets, onert::exec::IPermuteFunction::_permute_types, onert::exec::IPermuteFunction::_src_tensors, and onert::exec::IPermuteFunction::_src_tensors_offsets.
|
overridevirtual |
Implements onert::exec::IPermuteFunction.
Reimplemented in onert::backend::builtin::train::kernel::PermuteLayer.
Definition at line 46 of file PermuteLayer.cc.
References onert::exec::IPermuteFunction::_dst_tensors, onert::exec::IPermuteFunction::_dst_tensors_offsets, onert::exec::IPermuteFunction::_permute_types, onert::exec::IPermuteFunction::_src_tensors, onert::exec::IPermuteFunction::_src_tensors_offsets, onert::backend::ITensor::buffer(), onert::ir::COPY, onert::backend::ITensor::has_padding(), onert::ir::NCHW_TO_NHWC, onert::ir::NHWC_TO_NCHW, onert::ir::sizeOfDataType(), and onert::exec::IPermuteFunction::underlying_type().
Referenced by onert::backend::builtin::train::kernel::PermuteLayer::optimize().
|
overridevirtual |
Reimplemented from onert::exec::IPermuteFunction.
Definition at line 188 of file PermuteLayer.cc.
References onert::exec::IPermuteFunction::_buffers_map, onert::exec::IPermuteFunction::_dst_tensors, onert::exec::IPermuteFunction::_dst_tensors_offsets, onert::exec::IPermuteFunction::_permute_types, onert::exec::IPermuteFunction::_src_tensors, onert::exec::IPermuteFunction::_src_tensors_offsets, onert::backend::ITensor::applyShape(), onert::backend::ITensor::buffer(), onert::ir::convertShape(), onert::ir::COPY, onert::backend::ITensor::getShape(), onert::backend::ITensor::is_dynamic(), onert::exec::IPermuteFunction::permute(), and onert::exec::IPermuteFunction::underlying_type().
Referenced by onert::backend::builtin::train::kernel::PermuteLayer::forward(), and package.infer.session::inference().