SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
smv_tiling_base.h
1 #ifndef _OPERATORS_SMV_SMV_TILING_BASE_H_
2 #define _OPERATORS_SMV_SMV_TILING_BASE_H_
3 
4 #include "smaug/core/backend.h"
5 #include "smaug/core/tensor.h"
6 #include "smaug/operators/smv/smv_tiling_common.h"
7 
8 namespace smaug {
9 namespace smv {
10 
12  protected:
13 
37  static TilingDims findBestTilingDims(const TensorShape& shape,
38  int maxTileSize,
39  const std::vector<int>& minShape);
40 
50  static void enum2DTensorTilingConfigs(TensorShape shape,
51  int maxTileSize,
52  const std::vector<int>& minShape,
53  const std::vector<int>& strides,
54  std::vector<TensorShape>& configs);
64  static void enum4DTensorTilingConfigs(TensorShape shape,
65  int maxTileSize,
66  const std::vector<int>& minShape,
67  const std::vector<int>& strides,
68  std::vector<TensorShape>& configs);
69 };
70 
71 } // namespace smv
72 } // namespace smaug
73 
74 #endif
smaug::smv::TilingOptimizerBase::enum4DTensorTilingConfigs
static void enum4DTensorTilingConfigs(TensorShape shape, int maxTileSize, const std::vector< int > &minShape, const std::vector< int > &strides, std::vector< TensorShape > &configs)
Enumerates all tiling configs for a four dimensional Tensor.
Definition: smv_tiling_base.cpp:78
smaug::smv::TilingDims
TilingDims
The set of supported tiling strategies.
Definition: smv_tiling_common.h:13
smaug::smv::TilingOptimizerBase::enum2DTensorTilingConfigs
static void enum2DTensorTilingConfigs(TensorShape shape, int maxTileSize, const std::vector< int > &minShape, const std::vector< int > &strides, std::vector< TensorShape > &configs)
Enumerates all tiling configs for a two dimensional Tensor.
Definition: smv_tiling_base.cpp:56
smaug::TensorShape
TensorShape describes the shape of a Tensor.
Definition: tensor.h:35
smaug::smv::TilingOptimizerBase
Definition: smv_tiling_base.h:11
smaug::smv::TilingOptimizerBase::findBestTilingDims
static TilingDims findBestTilingDims(const TensorShape &shape, int maxTileSize, const std::vector< int > &minShape)
Find the best set of dimensions to tile a given tensor shape.
Definition: smv_tiling_base.cpp:10
smaug
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Definition: backend.cpp:38