SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
smaug::SmvConvolutionOp Class Reference

SMV backend implementation of convolution. More...

#include <smv_convolution_op.h>

Inheritance diagram for smaug::SmvConvolutionOp:
smaug::ConvolutionOp< SmvBackend >

Detailed Description

SMV backend implementation of convolution.

The dataflow is inspired by the NVDLA convolution engine.

Definition at line 27 of file smv_convolution_op.h.

Public Member Functions

void tile () override
 
void run () override
 
- Public Member Functions inherited from smaug::ConvolutionOp< SmvBackend >
 ConvolutionOp (const std::string &name, Workspace *workspace)
 
void setWeightDims (int _weightRows, int _weightCols, int _numOfmaps)
 
void setStride (int _rowStride, int _colStride)
 
void setPadding (PaddingType padding)
 
bool validate () override
 
virtual TensorShape inferOutputShape () const
 
virtual TensorShape inferWeightsShape () const
 
void createWeightsTensors ()
 Create placeholder tensors for weights, assuming any data layout is okay.
 
void createOutputTensors ()
 
void createAllTensors () override
 
int getNumOfmaps () const
 
void run () override
 
void run ()
 
int getNumParameters () const override
 
std::vector< TensorBase * > getParameterizableInputs () override
 
int getRowStride () const
 
int getColStride () const
 
int getWeightRows () const
 
int getWeightCols () const
 
PaddingType getPadding () const
 
std::vector< int > getInputPadding () const
 Compute padding sizes on the row/column boundaries of the input feature map.
 
bool isSamplingSupported () const override
 
void setSamplingInfo (const SamplingInfo &_sampling) override
 

Protected Member Functions

void runNHWC (TiledTensor &inputs, TiledTensor &weights, TiledTensor &outputs)
 Tiling scheduler for this operator.
 
std::unique_ptr< volatile int > invokeSystolicArrayKernel (unsigned accelId, float16 *inputs, float16 *weights, float16 *outputs, int inputsDims[4], int weightsDims[4], int outputsDims[4], int inputsPad, int weightsPad, int outputPad, int inputHaloPad[4], int stride, int ifmapStart, int kernStart, bool accumulate, bool readInputs, bool readWeights, bool sendResults, ActivationInfo *actInfo)
 
- Protected Member Functions inherited from smaug::ConvolutionOp< SmvBackend >
int computeOutputDim (int inputDim, int weightDim, int stride, PaddingType pad) const
 
int computeOutputDim (int inputDim, int weightDim, int stride, int padding) const
 

Protected Attributes

std::array< TiledTensor, 3 > tiledTensors
 
- Protected Attributes inherited from smaug::ConvolutionOp< SmvBackend >
int weightRows
 
int weightCols
 
int numOfmaps
 
int rowStride
 
int colStride
 
PaddingType paddingType
 
std::string weightsName
 
SamplingInfo sampling
 

Friends

class smv::conv::TilingOptimizer
 

Additional Inherited Members

- Public Types inherited from smaug::ConvolutionOp< SmvBackend >
enum  
 
enum  
 

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