SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
smv_pooling_tiling.h
1 #ifndef _OPERATORS_SMV_SMV_POOLING_TILING_H_
2 #define _OPERATORS_SMV_SMV_POOLING_TILING_H_
3 
4 #include "smaug/core/backend.h"
5 #include "smaug/core/tensor.h"
6 #include "smaug/operators/smv/smv_tiling_common.h"
7 #include "smaug/operators/smv/smv_tiling_base.h"
8 
9 namespace smaug {
10 
11 class SmvPoolingOp;
12 
13 namespace smv {
14 namespace pool {
15 
20  public:
21  static std::array<TiledTensor, 2> doTiling(SmvPoolingOp* op);
22 
47 
48  protected:
49 
59  static std::array<TilingDims, 2> determineBestTilingDims(
60  Tensor* inputs,
61  Tensor* outputs,
62  int maxTileSize,
63  std::pair<int, int> poolSize);
64 };
65 
66 } // namespace pool
67 } // namespace smv
68 } // namespace smaug
69 
70 #endif
smaug::Tensor
Tensor represents a single multi-dimensional array of data.
Definition: tensor.h:344
smaug::SmvPoolingOp
Base class for SMV pooling oeprators.
Definition: smv_pooling_op.h:23
smaug::smv::pool::TilingOptimizer
Tiling optimizer for pooling operators on SMV.
Definition: smv_pooling_tiling.h:19
smaug::smv::pool::TilingOptimizer::computeBasicTileShapes
static TilingConfig computeBasicTileShapes(SmvPoolingOp *op)
Determine the best basic tiling shape for this pooling layer.
Definition: smv_pooling_tiling.cpp:52
smaug::smv::pool::TilingOptimizer::determineBestTilingDims
static std::array< TilingDims, 2 > determineBestTilingDims(Tensor *inputs, Tensor *outputs, int maxTileSize, std::pair< int, int > poolSize)
Determine the best tiling dimensions for running pooling on SMV.
Definition: smv_pooling_tiling.cpp:13
smaug::smv::TilingOptimizerBase
Definition: smv_tiling_base.h:11
smaug::smv::TilingConfig
A TilingConfig describes tiling strategies and optimal tile sizes for inputs, weights,...
Definition: smv_tiling_common.h:29
smaug
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Definition: backend.cpp:38