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

Average pooling operator on SMV. More...

#include <smv_pooling_op.h>

Inheritance diagram for smaug::SmvAvgPoolingOp:
smaug::SmvPoolingOp smaug::PoolingOp< SmvBackend > smaug::Operator

Detailed Description

Average pooling operator on SMV.

Definition at line 46 of file smv_pooling_op.h.

Public Member Functions

 SmvAvgPoolingOp (const std::string &name, Workspace *workspace)
 
void tile () override
 
void run () override
 Executes the Operator. More...
 
- Public Member Functions inherited from smaug::PoolingOp< SmvBackend >
 PoolingOp (const std::string &name, OpType _opType, Workspace *workspace)
 
std::pair< int, int > getPoolingSize () const
 
std::pair< int, int > getPoolingStride () const
 
void setPoolingSize (int rowSize, int colSize)
 
void setPoolingStride (int rowStride, int colStride)
 
bool validate () override
 Returns true if the parameters/tensors of this operator are all valid.
 
int getNumOfmaps () const
 
TensorShape inferOutputShape () const
 
void createOutputTensors ()
 
void createAllTensors () override
 For tests: creates all input and output tensors for this operator. More...
 
bool isSamplingSupported () const override
 
void setSamplingInfo (const SamplingInfo &_sampling) override
 
- Public Member Functions inherited from smaug::Operator
 Operator (const std::string &_name, OpType _opType, Workspace *_workspace)
 
virtual bool isDead ()
 Returns true if the Operator is dead. More...
 
virtual std::vector< TensorBase * > getParameterizableInputs ()
 Return a list of Tensors whose values that are parameterizable. More...
 
virtual int getNumParameters () const
 This returns the number of parameterizable weights in the operator.
 
virtual bool isSamplingSupported () const
 
void printSummary (std::ostream &out) const
 
void setInput (TensorBase *op, int index)
 
void setOutput (TensorBase *op, int index)
 
void setNumPendingInputs (int num)
 Set the number of input tensors that this operator is waiting on. More...
 
int getNumPendingInputs () const
 
void decrNumPendingInputs ()
 
const std::string & getName () const
 
Vertex getVertex () const
 
void setVertex (Vertex v)
 
OpType getOpType () const
 
WorkspacegetWorkspace ()
 
TensorgetInput (int index) const
 
const std::vector< TensorBase * > & getInputs () const
 
TensorgetOutput (int index) const
 
const std::vector< TensorBase * > & getOutputs () const
 
void setInputsMemType (MemoryType type)
 
void setWeightsMemType (MemoryType type)
 
void setOutputsMemType (MemoryType type)
 
MemoryType getInputsMemType () const
 
MemoryType getWeightsMemType () const
 
MemoryType getOutputsMemType () const
 

Additional Inherited Members

- Protected Types inherited from smaug::PoolingOp< SmvBackend >
enum  
 
enum  
 
- Protected Member Functions inherited from smaug::SmvPoolingOp
void runNHWC (TiledTensor &inputs, TiledTensor &outputs)
 
- Protected Member Functions inherited from smaug::PoolingOp< SmvBackend >
int calcOutputRows (int inputRows) const
 
int calcOutputCols (int inputCols) const
 
int computeOutputDim (int inputDims, int poolSize, int poolStride) const
 
- Protected Attributes inherited from smaug::SmvPoolingOp
std::array< TiledTensor, 2 > tiledTensors
 
- Protected Attributes inherited from smaug::PoolingOp< SmvBackend >
int poolingRowSize
 
int poolingColSize
 
int poolingRowStride
 
int poolingColStride
 
SamplingInfo sampling
 
- Protected Attributes inherited from smaug::Operator
std::vector< TensorBase * > inputs
 An ordered list of input tensors consumed by this operator. More...
 
std::vector< TensorBase * > outputs
 An ordered list of output tensors produced by this operator. More...
 
std::string name
 
OpType opType
 
Vertex vertex
 The BGL Vertex corresponding to this Operator.
 
Workspaceworkspace
 
int numPendingInputs
 The number of tensors that this operator is waiting on before it can be scheduled.
 
MemoryType inputsMemType
 The memory interface over which input activations are expected to arrive.
 
MemoryType weightsMemType
 The memory interface over which weights are expected to arrive.
 
MemoryType outputsMemType
 The memory interface over which outputs are expected to be delivered.
 

Member Function Documentation

◆ run()

void smaug::SmvAvgPoolingOp::run ( )
overridevirtual

Executes the Operator.

All Operator subclasses must override this method.

Reimplemented from smaug::SmvPoolingOp.

Definition at line 138 of file smv_pooling_op.cpp.


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