ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::backend::ruy::ops Namespace Reference

Data Structures

class  ConvolutionLayer
 
class  FullyConnectedLayer
 

Functions

nnfw::ruy::PaddingType getPaddingType (ir::PaddingType ir_padding_type)
 
nnfw::ruy::Shape getTensorShape (const IPortableTensor *tensor)
 
nnfw::ruy::FusedActivationFunctionType convertActivationType (const ir::Activation activation)
 

Function Documentation

◆ convertActivationType()

nnfw::ruy::FusedActivationFunctionType onert::backend::ruy::ops::convertActivationType ( const ir::Activation  activation)
inline

◆ getPaddingType()

nnfw::ruy::PaddingType onert::backend::ruy::ops::getPaddingType ( ir::PaddingType  ir_padding_type)

Definition at line 22 of file OperationUtils.cc.

23{
24 switch (ir_padding_type)
25 {
26 case ir::PaddingType::EXPLICIT:
28 case ir::PaddingType::SAME:
30 case ir::PaddingType::VALID:
32 default:
33 throw std::runtime_error("Wrong padding type.");
34 break;
35 }
36}

References onert::ir::EXPLICIT, nnfw::ruy::kNone, nnfw::ruy::kSame, nnfw::ruy::kValid, onert::ir::SAME, and onert::ir::VALID.

◆ getTensorShape()

nnfw::ruy::Shape onert::backend::ruy::ops::getTensorShape ( const IPortableTensor tensor)
inline

Definition at line 36 of file OperationUtils.h.

37{
38 if (tensor == nullptr)
39 return nnfw::ruy::Shape();
40
41 const ir::Shape &shape = tensor->get_info().shape();
42 auto rank = shape.rank();
43 nnfw::ruy::Shape ret(rank);
44 auto data = ret.DimsData();
45 for (int i = 0; i < rank; ++i)
46 {
47 data[i] = shape.dim(i);
48 }
49 return ret;
50}

References nnfw::ruy::Shape::DimsData().

Referenced by onert::backend::ruy::ops::ConvolutionLayer::convFloat32(), onert::backend::ruy::ops::FullyConnectedLayer::fullyConnectedFloat32(), onert::backend::ruy::ops::ConvolutionLayer::prepare(), and onert::backend::ruy::ops::FullyConnectedLayer::prepare().