SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
smv_inner_product_tiling.h
1 #ifndef _OPERATORS_SMV_SMV_INNER_PRODUCT_TILING_H_
2 #define _OPERATORS_SMV_SMV_INNER_PRODUCT_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 SmvInnerProductOp;
12 
13 namespace smv {
14 namespace fc {
15 
20  public:
21  static std::array<TiledTensor, 3> doTiling(SmvInnerProductOp* op);
22 
48 
49  protected:
60  static std::array<TilingDims, 3> determineBestTilingDims(Tensor* inputs,
61  Tensor* weights,
62  Tensor* outputs,
63  int maxTileSize);
64 };
65 
66 } // namespace fc
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::smv::fc::TilingOptimizer::computeBasicTileShapes
static TilingConfig computeBasicTileShapes(SmvInnerProductOp *op)
Determine the best basic tiling shape for this fc layer without bias.
Definition: smv_inner_product_tiling.cpp:35
smaug::smv::fc::TilingOptimizer::determineBestTilingDims
static std::array< TilingDims, 3 > determineBestTilingDims(Tensor *inputs, Tensor *weights, Tensor *outputs, int maxTileSize)
Determine the best tiling dimensions for running inner product on SMV.
Definition: smv_inner_product_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
smaug::smv::fc::TilingOptimizer
Tiling optimizer for SMV inner product kernel.
Definition: smv_inner_product_tiling.h:19
smaug::SmvInnerProductOp
Inner product operator on SMV.
Definition: smv_inner_product_op.h:28