ONE - On-device Neural Engine
|
Namespaces | |
namespace | ruy_support |
Data Structures | |
class | Conv |
struct | ConvParams |
struct | FullyConnectedParams |
struct | GemmParams |
struct | MatrixParams |
struct | PaddingValues |
class | Shape |
struct | UNUSED_ALL |
Enumerations | |
enum class | FusedActivationFunctionType { kNone = 0 , kRelu6 = 1 , kRelu1 = 2 , kRelu = 3 , kTanh = 4 , kSigmoid = 6 } |
enum class | PaddingType { kNone = 0 , kSame = 1 , kValid = 2 } |
enum class | Order { kColMajor , kRowMajor } |
enum class | CachePolicy : std::uint8_t { kNeverCache , kCacheIfLargeSpeedup , kAlwaysCache } |
enum class | QuantizationFlavor { kFloatingPoint , kIntegerWithUniformMultiplier , kIntegerWithPerRowMultiplier } |
Functions | |
void | FullyConnected (const FullyConnectedParams ¶ms, const Shape &input_shape, const float *input_data, const Shape &weights_shape, const float *weights_data, const Shape &, const float *optional_bias_data, const Shape &output_shape, float *output_data, ::ruy::Context *ruy_context) |
bool | PortableIsZeroVector (const float *vector, int v_size) |
int | MatchingDim (const Shape &shape1, int index1, const Shape &shape2, int index2) |
template<typename... Args> | |
int | MatchingDim (const Shape &shape1, int index1, const Shape &shape2, int index2, Args... args) |
Shape | GetShape (const std::vector< int32_t > &data) |
int | Offset (const Shape &shape, int i0, int i1, int i2, int i3) |
int | Offset (const Shape &shape, int *index) |
int | FlatSizeSkipDim (const Shape &shape, int skip_dim) |
template<typename... Ts> | |
bool | checkMatching (const Shape &shape, Ts... check_shapes) |
template<typename... Ts> | |
int | MatchingFlatSize (const Shape &shape, Ts... check_shapes) |
int | MatchingFlatSizeSkipDim (const Shape &shape, int skip_dim, const Shape &check_shape_0) |
int | MatchingFlatSizeSkipDim (const Shape &shape, int skip_dim, const Shape &check_shape_0, const Shape &check_shape_1) |
int | MatchingElementsSize (const Shape &shape, const Shape &check_shape_0, const Shape &check_shape_1) |
bool | IsZeroVector (const float *vector, int v_size) |
template<typename AccumScalar , typename DstScalar , QuantizationFlavor quantization_flavor> | |
void | ValidateGemmParams (const GemmParams< AccumScalar, DstScalar, quantization_flavor > ¶ms) |
CachePolicy | DefaultCachePolicy (bool is_constant_data) |
template<typename T > | |
void | ExtractPatchIntoBufferColumn (const Shape &input_shape, int w, int h, int b, int kheight, int kwidth, int stride_width, int stride_height, int pad_width, int pad_height, int in_width, int in_height, int in_depth, int single_buffer_length, int buffer_id, const T *in_data, T *conv_buffer_data, uint8_t zero_byte) |
template<typename T > | |
void | DilatedIm2col (const ConvParams ¶ms, const Shape &input_shape, const T *input_data, const Shape &filter_shape, const Shape &output_shape, T *im2col_data, const int32_t *zero_bytes, const int zero_bytes_len) |
template<typename T > | |
void | DilatedIm2col (const ConvParams ¶ms, uint8_t zero_byte, const Shape &input_shape, const T *input_data, const Shape &filter_shape, const Shape &output_shape, T *im2col_data) |
template<typename T > | |
void | Im2col (const ConvParams ¶ms, int kheight, int kwidth, uint8_t zero_byte, const Shape &input_shape, const T *input_data, const Shape &output_shape, T *output_data) |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Enumerator | |
---|---|
kFloatingPoint | |
kIntegerWithUniformMultiplier | |
kIntegerWithPerRowMultiplier |
Definition at line 159 of file Types.h.
|
inline |
Definition at line 269 of file Shape.h.
References nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), and nnfw::ruy::Shape::FlatSize().
Referenced by MatchingFlatSize().
|
inline |
Definition at line 267 of file Types.h.
References kCacheIfLargeSpeedup, and kNeverCache.
Referenced by FullyConnected().
void nnfw::ruy::DilatedIm2col | ( | const ConvParams & | params, |
const Shape & | input_shape, | ||
const T * | input_data, | ||
const Shape & | filter_shape, | ||
const Shape & | output_shape, | ||
T * | im2col_data, | ||
const int32_t * | zero_bytes, | ||
const int | zero_bytes_len | ||
) |
Definition at line 118 of file Utils.h.
References nnfw::ruy::ConvParams::dilation_height_factor, nnfw::ruy::ConvParams::dilation_width_factor, nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), nnfw::ruy::PaddingValues::height, MatchingDim(), Offset(), output_shape, nnfw::ruy::ConvParams::padding_values, nnfw::ruy::ConvParams::stride_height, nnfw::ruy::ConvParams::stride_width, and nnfw::ruy::PaddingValues::width.
void nnfw::ruy::DilatedIm2col | ( | const ConvParams & | params, |
uint8_t | zero_byte, | ||
const Shape & | input_shape, | ||
const T * | input_data, | ||
const Shape & | filter_shape, | ||
const Shape & | output_shape, | ||
T * | im2col_data | ||
) |
Definition at line 209 of file Utils.h.
References output_shape.
|
inline |
Definition at line 31 of file Utils.h.
References nnfw::ruy::Shape::DimensionsCount(), and Offset().
Referenced by Im2col().
|
inline |
Definition at line 254 of file Shape.h.
References nnfw::ruy::Shape::DimensionsCount(), and nnfw::ruy::Shape::DimsData().
Referenced by FullyConnected(), and MatchingFlatSizeSkipDim().
|
inline |
Definition at line 34 of file FullyConnected.h.
References nnfw::ruy::GemmParams< AccumScalar, DstScalar, quantization_flavor >::bias, nnfw::ruy::MatrixParams< Scalar >::cache_policy, nnfw::ruy::GemmParams< AccumScalar, DstScalar, quantization_flavor >::clamp_max, nnfw::ruy::GemmParams< AccumScalar, DstScalar, quantization_flavor >::clamp_min, nnfw::ruy::MatrixParams< Scalar >::cols, DefaultCachePolicy(), nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), nnfw::ruy::Shape::FlatSize(), FlatSizeSkipDim(), nnfw::ruy::FullyConnectedParams::float_activation_max, nnfw::ruy::FullyConnectedParams::float_activation_min, kColMajor, kRowMajor, nnfw::ruy::FullyConnectedParams::lhs_cacheable, nnfw::ruy::ruy_support::MakeRuyMatrix(), nnfw::ruy::ruy_support::MakeRuyMulParams(), nnfw::ruy::MatrixParams< Scalar >::order, output_shape, nnfw::ruy::FullyConnectedParams::rhs_cacheable, and nnfw::ruy::MatrixParams< Scalar >::rows.
Referenced by onert::backend::ruy::ops::FullyConnectedLayer::fullyConnectedFloat32().
|
inline |
void nnfw::ruy::Im2col | ( | const ConvParams & | params, |
int | kheight, | ||
int | kwidth, | ||
uint8_t | zero_byte, | ||
const Shape & | input_shape, | ||
const T * | input_data, | ||
const Shape & | output_shape, | ||
T * | output_data | ||
) |
Definition at line 219 of file Utils.h.
References nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), ExtractPatchIntoBufferColumn(), nnfw::ruy::PaddingValues::height, MatchingDim(), output_shape, nnfw::ruy::ConvParams::padding_values, nnfw::ruy::ConvParams::stride_height, nnfw::ruy::ConvParams::stride_width, and nnfw::ruy::PaddingValues::width.
|
inline |
Definition at line 29 of file TensorUtils.h.
References IsZeroVector(), and NEON_OR_PORTABLE.
Referenced by IsZeroVector(), and onert::backend::ruy::ops::FullyConnectedLayer::prepare().
|
inline |
Definition at line 221 of file Shape.h.
References nnfw::ruy::Shape::Dims().
Referenced by DilatedIm2col(), Im2col(), and MatchingDim().
int nnfw::ruy::MatchingDim | ( | const Shape & | shape1, |
int | index1, | ||
const Shape & | shape2, | ||
int | index2, | ||
Args... | args | ||
) |
Definition at line 229 of file Shape.h.
References nnfw::ruy::Shape::Dims(), and MatchingDim().
|
inline |
Definition at line 334 of file Shape.h.
References nnfw::ruy::Shape::FlatSize().
|
inline |
Definition at line 298 of file Shape.h.
References checkMatching(), and nnfw::ruy::Shape::FlatSize().
|
inline |
Definition at line 305 of file Shape.h.
References nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), and FlatSizeSkipDim().
Referenced by MatchingFlatSizeSkipDim().
|
inline |
Definition at line 319 of file Shape.h.
References nnfw::ruy::Shape::DimensionsCount(), nnfw::ruy::Shape::Dims(), and MatchingFlatSizeSkipDim().
|
inline |
|
inline |
Definition at line 238 of file Shape.h.
References nnfw::ruy::Shape::DimensionsCount(), and nnfw::ruy::Shape::DimsDataUpTo4D().
Referenced by DilatedIm2col(), ExtractPatchIntoBufferColumn(), and Offset().
|
inline |
Definition at line 26 of file PortableTensorUtils.h.
void nnfw::ruy::ValidateGemmParams | ( | const GemmParams< AccumScalar, DstScalar, quantization_flavor > & | params | ) |
Definition at line 229 of file Types.h.
References kFloatingPoint, kIntegerWithPerRowMultiplier, and kIntegerWithUniformMultiplier.