ONE - On-device Neural Engine
Loading...
Searching...
No Matches
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 28 of file OperationUtils.cc.

29{
30 switch (ir_padding_type)
31 {
32 case ir::PaddingType::EXPLICIT:
34 case ir::PaddingType::SAME:
36 case ir::PaddingType::VALID:
38 default:
39 throw std::runtime_error("Wrong padding type.");
40 break;
41 }
42}

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 42 of file OperationUtils.h.

43{
44 if (tensor == nullptr)
45 return nnfw::ruy::Shape();
46
47 const ir::Shape &shape = tensor->get_info().shape();
48 auto rank = shape.rank();
49 nnfw::ruy::Shape ret(rank);
50 auto data = ret.DimsData();
51 for (int i = 0; i < rank; ++i)
52 {
53 data[i] = shape.dim(i);
54 }
55 return ret;
56}

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().