ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::cker::FCTempArena Class Reference

#include <FullyConnected.h>

Public Member Functions

 FCTempArena (void)
 
void prepare (const Shape &input_shape, const Shape &weights_shape)
 

Data Fields

bool prepared
 
std::vector< int8_t > input_quantized
 
std::vector< float > scaling_factors
 
std::vector< int32_t > accum_scratch
 

Detailed Description

Definition at line 36 of file FullyConnected.h.

Constructor & Destructor Documentation

◆ FCTempArena()

nnfw::cker::FCTempArena::FCTempArena ( void  )
inline

Definition at line 39 of file FullyConnected.h.

40 {
41 // DO NOTHING
42 }
std::vector< int8_t > input_quantized
std::vector< float > scaling_factors
std::vector< int32_t > accum_scratch

Member Function Documentation

◆ prepare()

void nnfw::cker::FCTempArena::prepare ( const Shape input_shape,
const Shape weights_shape 
)
inline

Definition at line 44 of file FullyConnected.h.

45 {
46 auto input_size = input_shape.FlatSize();
47 input_quantized.resize(input_size);
48
49 assert(weights_shape.DimensionsCount() == 2);
50 int batch_size = input_size / weights_shape.Dims(1);
51 scaling_factors.resize(batch_size);
52 prepared = true;
53 }

References nnfw::cker::Shape::DimensionsCount(), nnfw::cker::Shape::Dims(), nnfw::cker::Shape::FlatSize(), input_quantized, prepared, and scaling_factors.

Referenced by onert::backend::cpu::ops::FullyConnectedLayer::fullyConnectedHybrid().

Field Documentation

◆ accum_scratch

std::vector<int32_t> nnfw::cker::FCTempArena::accum_scratch

Definition at line 59 of file FullyConnected.h.

Referenced by nnfw::cker::FullyConnectedHybrid().

◆ input_quantized

std::vector<int8_t> nnfw::cker::FCTempArena::input_quantized

Definition at line 57 of file FullyConnected.h.

Referenced by nnfw::cker::FullyConnectedHybrid(), and prepare().

◆ prepared

bool nnfw::cker::FCTempArena::prepared

◆ scaling_factors

std::vector<float> nnfw::cker::FCTempArena::scaling_factors

Definition at line 58 of file FullyConnected.h.

Referenced by nnfw::cker::FullyConnectedHybrid(), and prepare().


The documentation for this class was generated from the following file: