ONE - On-device Neural Engine
|
Namespaces | |
namespace | bcq |
Data Structures | |
struct | StridedSliceParams |
Typedefs | |
using | Shapes = std::vector< ir::Shape > |
Functions | |
ir::Shape | inferArgMinMaxShape (const ir::Shape &input_shape, int axis, int rank) |
ir::Shape | inferBatchMatMulShape (const ir::Shape &lhs_shape, const ir::Shape &rhs_shape, const ir::operation::BatchMatMul::Param ¶m) |
ir::Shape | inferBCQFullyConnectedShape (const ir::Shape &in_shape, const ir::Shape &cluster_shape, const int32_t *cluster_buf) |
ir::Shape | inferBCQGatherShape (const ir::Shape &indices_shape, const ir::Shape &cluster_shape, const int32_t *cluster_buf, int rank, const ir::operation::BCQGather::Param ¶m) |
ir::Shape | inferBroadcastToShape (const ir::Shape shp_shape, const int32_t *shp_buf) |
ir::Shape | inferConcatShape (const Shapes &in_shapes, const ir::operation::Concat::Param ¶m) |
ir::Shape | inferConv2DShape (const ir::Shape &in_shape, const ir::Shape &ker_shape, const ir::operation::Conv2D::Param ¶m) |
ir::Shape | inferDepthwiseConv2DShape (const ir::Shape &in_shape, const ir::Shape &ker_shape, const ir::operation::DepthwiseConv2D::Param ¶m) |
ir::Shape | inferEltwiseShape (const ir::Shape &lhs_shape, const ir::Shape &rhs_shape) |
ir::Shape | inferExpandDimsShape (const ir::Shape &in_shape, int32_t axis) |
template<typename T > | |
ir::Shape | inferFillShape (const ir::Shape &fill_shape, const T *shape_buf) |
ir::Shape | inferFullyConnectedShape (const ir::Shape &in_shape, const ir::Shape &ker_shape) |
ir::Shape | inferGatherShape (const ir::Shape &input_shape, const ir::Shape &indices_shape, int axis, int rank) |
ir::Shape | inferOnehotShape (const ir::Shape &input_shape, const int depth, int axis) |
ir::Shape | inferPackShape (const ir::Shape &input_shape, int axis, int rank, int num) |
ir::Shape | inferPadShape (const ir::Shape &in_shape, const int32_t *pad_buf, const size_t num_pads) |
ir::Shape | inferPoolShape (const ir::Shape &in_shape, const ir::operation::Pool2D::Param ¶m) |
template<typename T > | |
ir::Shape | inferRangeShape (T start_val, T limit_val, T delta_val) |
ir::Shape | inferReshapeShape (const ir::Shape &input_shape, const int32_t *shape_buf, const int32_t shape_num_elements) |
ir::Shape | inferReduceShape (const ir::Shape &input_shape, const std::vector< int > &axes, bool keep_dims) |
template<float * > | |
ir::Shape | inferRangeShape (float *start_val, float *limit_val, float *delta_val) |
ir::Shape | inferResizeBilinearShape (const ir::Shape &in_shape, const int32_t output_height, const int32_t output_width) |
ir::Shape | inferSelectShape (const ir::Shape &input_cond_shape, const ir::Shape &input_true_shape, const ir::Shape &input_false_shape) |
template<typename T > | |
ir::Shape | inferSliceShape (const ir::Shape &input_shape, const T *begins_buf, const T *sizes_buf) |
ir::Shape | inferSpaceToBatchNDShape (const ir::Shape &input_shape, const ir::Shape &block_shape_shape, const ir::Shape &padding_shape, const int32_t *block_shape_buf, const int32_t *padding_buf) |
ir::Shape | inferSplitShape (const ir::Shape input_shape, int axis_value, int num_splits) |
ir::Shape | inferSqueezeShape (const ir::Shape &in_shape, const ir::operation::Squeeze::Param ¶m) |
template<typename T > | |
StridedSliceParams | buildStridedSliceParams (const T *begin, const T *end, const T *strides, const uint32_t begin_mask, const uint32_t end_mask, const uint32_t shrink_axis_mask, const uint8_t rank) |
ir::Shape | inferStridedSliceShape (const ir::Shape &input_shape, const StridedSliceParams &op_params, uint32_t rank) |
ir::Shape | inferTileShape (const ir::Shape &in_shape, const int32_t *multiplier_buf, const int32_t multiplier_size) |
ir::Shape | inferTransposeShape (const ir::Shape &in_shape, const int32_t *perm_buf, const int32_t rank) |
ir::Shape | inferUnpackShape (const ir::Shape &input_shape, int axis, int rank) |
std::pair< int, int > | calcConvLikeHeightAndWidth (const int in_h, const int in_w, const int ker_h, const int ker_w, const ir::Padding pad, const ir::Stride stride, const ir::Dilation dilation={1, 1}) |
template ir::Shape | inferFillShape (const ir::Shape &fill_shape, const int32_t *shape_buf) |
template ir::Shape | inferFillShape (const ir::Shape &fill_shape, const int64_t *shape_buf) |
template ir::Shape | inferRangeShape (int start_val, int limit_val, int delta_val) |
template ir::Shape | inferRangeShape (float start_val, float limit_val, float delta_val) |
template ir::Shape | inferSliceShape (const ir::Shape &input_shape, const int32_t *begins_buf, const int32_t *sizes_buf) |
template ir::Shape | inferSliceShape (const ir::Shape &input_shape, const int64_t *begins_buf, const int64_t *sizes_buf) |
template StridedSliceParams | buildStridedSliceParams (const uint32_t *begin, const uint32_t *end, const uint32_t *strides, const uint32_t begin_mask, const uint32_t end_mask, const uint32_t shrink_axis_mask, const uint8_t rank) |
int | Clamp (const int v, const int lo, const int hi) |
int | StartForAxis (const StridedSliceParams ¶ms, const ir::Shape &input_shape, int axis) |
int | StopForAxis (const StridedSliceParams ¶ms, const ir::Shape &input_shape, int axis, int start_for_axis) |
using onert::shape_inference::Shapes = typedef std::vector<ir::Shape> |
Definition at line 39 of file ShapeInference.h.
StridedSliceParams onert::shape_inference::buildStridedSliceParams | ( | const T * | begin, |
const T * | end, | ||
const T * | strides, | ||
const uint32_t | begin_mask, | ||
const uint32_t | end_mask, | ||
const uint32_t | shrink_axis_mask, | ||
const uint8_t | rank | ||
) |
Definition at line 868 of file ShapeInference.cc.
References begin, onert::shape_inference::StridedSliceParams::begin_mask, onert::shape_inference::StridedSliceParams::ellipsis_mask, onert::shape_inference::StridedSliceParams::end_mask, onert::shape_inference::StridedSliceParams::new_axis_mask, onert::shape_inference::StridedSliceParams::shrink_axis_mask, onert::shape_inference::StridedSliceParams::start_indices, onert::shape_inference::StridedSliceParams::start_indices_count, onert::shape_inference::StridedSliceParams::stop_indices, onert::shape_inference::StridedSliceParams::stop_indices_count, onert::shape_inference::StridedSliceParams::strides, and onert::shape_inference::StridedSliceParams::strides_count.
Referenced by onert::exec::DynamicShapeInferer::visit().
template StridedSliceParams onert::shape_inference::buildStridedSliceParams | ( | const uint32_t * | begin, |
const uint32_t * | end, | ||
const uint32_t * | strides, | ||
const uint32_t | begin_mask, | ||
const uint32_t | end_mask, | ||
const uint32_t | shrink_axis_mask, | ||
const uint8_t | rank | ||
) |
std::pair< int, int > onert::shape_inference::calcConvLikeHeightAndWidth | ( | const int | in_h, |
const int | in_w, | ||
const int | ker_h, | ||
const int | ker_w, | ||
const ir::Padding | pad, | ||
const ir::Stride | stride, | ||
const ir::Dilation | dilation = {1, 1} |
||
) |
Definition at line 93 of file ShapeInference.cc.
Referenced by inferConv2DShape(), inferDepthwiseConv2DShape(), and inferPoolShape().
int onert::shape_inference::Clamp | ( | const int | v, |
const int | lo, | ||
const int | hi | ||
) |
Definition at line 903 of file ShapeInference.cc.
Referenced by StartForAxis(), and StopForAxis().
ir::Shape onert::shape_inference::inferArgMinMaxShape | ( | const ir::Shape & | input_shape, |
int | axis, | ||
int | rank | ||
) |
Definition at line 129 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferBatchMatMulShape | ( | const ir::Shape & | lhs_shape, |
const ir::Shape & | rhs_shape, | ||
const ir::operation::BatchMatMul::Param & | param | ||
) |
Definition at line 231 of file ShapeInference.cc.
References onert::ir::operation::BatchMatMul::Param::adj_x, onert::ir::operation::BatchMatMul::Param::adj_y, and output_shape.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferBCQFullyConnectedShape | ( | const ir::Shape & | in_shape, |
const ir::Shape & | cluster_shape, | ||
const int32_t * | cluster_buf | ||
) |
Definition at line 410 of file ShapeInference.cc.
References onert::shape_inference::bcq::getOutputSize().
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferBCQGatherShape | ( | const ir::Shape & | indices_shape, |
const ir::Shape & | cluster_shape, | ||
const int32_t * | cluster_buf, | ||
int | rank, | ||
const ir::operation::BCQGather::Param & | param | ||
) |
Definition at line 422 of file ShapeInference.cc.
References onert::ir::operation::BCQGather::Param::axis, onert::shape_inference::bcq::getOutputSize(), and onert::ir::operation::BCQGather::Param::input_hidden_size.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferBroadcastToShape | ( | const ir::Shape | shp_shape, |
const int32_t * | shp_buf | ||
) |
Definition at line 280 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferConcatShape | ( | const Shapes & | in_shapes, |
const ir::operation::Concat::Param & | param | ||
) |
Definition at line 299 of file ShapeInference.cc.
References onert::ir::operation::Concat::Param::axis.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferConv2DShape | ( | const ir::Shape & | in_shape, |
const ir::Shape & | ker_shape, | ||
const ir::operation::Conv2D::Param & | param | ||
) |
Definition at line 324 of file ShapeInference.cc.
References calcConvLikeHeightAndWidth(), onert::ir::operation::Conv2D::Param::dilation, onert::ir::Stride::horizontal, onert::ir::operation::Conv2D::Param::padding, onert::ir::operation::Conv2D::Param::stride, and onert::ir::Stride::vertical.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferDepthwiseConv2DShape | ( | const ir::Shape & | in_shape, |
const ir::Shape & | ker_shape, | ||
const ir::operation::DepthwiseConv2D::Param & | param | ||
) |
Definition at line 342 of file ShapeInference.cc.
References calcConvLikeHeightAndWidth(), onert::ir::operation::DepthwiseConv2D::Param::dilation, onert::ir::Stride::horizontal, onert::ir::operation::DepthwiseConv2D::Param::multiplier, onert::ir::operation::DepthwiseConv2D::Param::padding, onert::ir::operation::DepthwiseConv2D::Param::stride, and onert::ir::Stride::vertical.
ir::Shape onert::shape_inference::inferEltwiseShape | ( | const ir::Shape & | lhs_shape, |
const ir::Shape & | rhs_shape | ||
) |
Definition at line 124 of file ShapeInference.cc.
Definition at line 361 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
template ir::Shape onert::shape_inference::inferFillShape | ( | const ir::Shape & | fill_shape, |
const int32_t * | shape_buf | ||
) |
template ir::Shape onert::shape_inference::inferFillShape | ( | const ir::Shape & | fill_shape, |
const int64_t * | shape_buf | ||
) |
ir::Shape onert::shape_inference::inferFillShape | ( | const ir::Shape & | fill_shape, |
const T * | shape_buf | ||
) |
Definition at line 380 of file ShapeInference.cc.
ir::Shape onert::shape_inference::inferFullyConnectedShape | ( | const ir::Shape & | in_shape, |
const ir::Shape & | ker_shape | ||
) |
Definition at line 396 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferGatherShape | ( | const ir::Shape & | input_shape, |
const ir::Shape & | indices_shape, | ||
int | axis, | ||
int | rank | ||
) |
Definition at line 457 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferOnehotShape | ( | const ir::Shape & | input_shape, |
const int | depth, | ||
int | axis | ||
) |
Definition at line 482 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferPackShape | ( | const ir::Shape & | input_shape, |
int | axis, | ||
int | rank, | ||
int | num | ||
) |
Definition at line 509 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferPadShape | ( | const ir::Shape & | in_shape, |
const int32_t * | pad_buf, | ||
const size_t | num_pads | ||
) |
Definition at line 529 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferPoolShape | ( | const ir::Shape & | in_shape, |
const ir::operation::Pool2D::Param & | param | ||
) |
Definition at line 546 of file ShapeInference.cc.
References calcConvLikeHeightAndWidth(), onert::ir::Stride::horizontal, onert::ir::operation::Pool2D::Param::kh, onert::ir::operation::Pool2D::Param::kw, onert::ir::operation::Pool2D::Param::padding, onert::ir::operation::Pool2D::Param::stride, and onert::ir::Stride::vertical.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferRangeShape | ( | float * | start_val, |
float * | limit_val, | ||
float * | delta_val | ||
) |
template ir::Shape onert::shape_inference::inferRangeShape | ( | float | start_val, |
float | limit_val, | ||
float | delta_val | ||
) |
template ir::Shape onert::shape_inference::inferRangeShape | ( | int | start_val, |
int | limit_val, | ||
int | delta_val | ||
) |
ir::Shape onert::shape_inference::inferRangeShape | ( | T | start_val, |
T | limit_val, | ||
T | delta_val | ||
) |
Definition at line 583 of file ShapeInference.cc.
ir::Shape onert::shape_inference::inferReduceShape | ( | const ir::Shape & | input_shape, |
const std::vector< int > & | axes, | ||
bool | keep_dims | ||
) |
Definition at line 149 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferReshapeShape | ( | const ir::Shape & | input_shape, |
const int32_t * | shape_buf, | ||
const int32_t | shape_num_elements | ||
) |
Definition at line 598 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferResizeBilinearShape | ( | const ir::Shape & | in_shape, |
const int32_t | output_height, | ||
const int32_t | output_width | ||
) |
Definition at line 558 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferSelectShape | ( | const ir::Shape & | input_cond_shape, |
const ir::Shape & | input_true_shape, | ||
const ir::Shape & | input_false_shape | ||
) |
Definition at line 636 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
template ir::Shape onert::shape_inference::inferSliceShape | ( | const ir::Shape & | input_shape, |
const int32_t * | begins_buf, | ||
const int32_t * | sizes_buf | ||
) |
template ir::Shape onert::shape_inference::inferSliceShape | ( | const ir::Shape & | input_shape, |
const int64_t * | begins_buf, | ||
const int64_t * | sizes_buf | ||
) |
ir::Shape onert::shape_inference::inferSliceShape | ( | const ir::Shape & | input_shape, |
const T * | begins_buf, | ||
const T * | sizes_buf | ||
) |
Definition at line 714 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferSpaceToBatchNDShape | ( | const ir::Shape & | input_shape, |
const ir::Shape & | block_shape_shape, | ||
const ir::Shape & | padding_shape, | ||
const int32_t * | block_shape_buf, | ||
const int32_t * | padding_buf | ||
) |
Definition at line 753 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferSplitShape | ( | const ir::Shape | input_shape, |
int | axis_value, | ||
int | num_splits | ||
) |
Definition at line 795 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferSqueezeShape | ( | const ir::Shape & | in_shape, |
const ir::operation::Squeeze::Param & | param | ||
) |
Definition at line 811 of file ShapeInference.cc.
References onert::ir::operation::Squeeze::Param::dims, and onert::ir::operation::Squeeze::Param::ndim.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferStridedSliceShape | ( | const ir::Shape & | input_shape, |
const StridedSliceParams & | op_params, | ||
uint32_t | rank | ||
) |
Definition at line 1018 of file ShapeInference.cc.
References begin, onert::shape_inference::StridedSliceParams::shrink_axis_mask, StartForAxis(), StopForAxis(), and onert::shape_inference::StridedSliceParams::strides.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferTileShape | ( | const ir::Shape & | in_shape, |
const int32_t * | multiplier_buf, | ||
const int32_t | multiplier_size | ||
) |
Definition at line 1050 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferTransposeShape | ( | const ir::Shape & | in_shape, |
const int32_t * | perm_buf, | ||
const int32_t | rank | ||
) |
Definition at line 1069 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
ir::Shape onert::shape_inference::inferUnpackShape | ( | const ir::Shape & | input_shape, |
int | axis, | ||
int | rank | ||
) |
Definition at line 1119 of file ShapeInference.cc.
Referenced by onert::exec::DynamicShapeInferer::visit().
int onert::shape_inference::StartForAxis | ( | const StridedSliceParams & | params, |
const ir::Shape & | input_shape, | ||
int | axis | ||
) |
Definition at line 913 of file ShapeInference.cc.
References onert::shape_inference::StridedSliceParams::begin_mask, Clamp(), onert::shape_inference::StridedSliceParams::start_indices, and onert::shape_inference::StridedSliceParams::strides.
Referenced by inferStridedSliceShape().
int onert::shape_inference::StopForAxis | ( | const StridedSliceParams & | params, |
const ir::Shape & | input_shape, | ||
int | axis, | ||
int | start_for_axis | ||
) |
Definition at line 956 of file ShapeInference.cc.
References Clamp(), onert::shape_inference::StridedSliceParams::end_mask, onert::shape_inference::StridedSliceParams::shrink_axis_mask, onert::shape_inference::StridedSliceParams::stop_indices, and onert::shape_inference::StridedSliceParams::strides.
Referenced by inferStridedSliceShape().