SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
smv_inner_product_op.h
1 #ifndef _OPERATORS_SMV_SMV_INNER_PRODUCT_OP_H_
2 #define _OPERATORS_SMV_SMV_INNER_PRODUCT_OP_H_
3 
4 #include "smaug/core/backend.h"
6 #include "smaug/operators/inner_product_op.h"
7 
8 namespace smaug {
9 
10 namespace smv {
11 
13 namespace fc {
14 
15 extern const int kNumPEs;
16 extern const int kNumMaccsPerPE;
17 
18 class TilingOptimizer;
19 
20 } // namespace fc
21 } // namespace smv
22 
28 class SmvInnerProductOp : public InnerProductOp<SmvBackend> {
29  public:
31  void tile() override;
32  void run() override;
33  friend class smv::fc::TilingOptimizer;
34 
35  protected:
36  void runNWA(TiledTensor& inputs, TiledTensor& weights, TiledTensor& outputs);
37 
38  std::array<TiledTensor, 3> tiledTensors;
39 };
40 
41 } // namespace smaug
42 
43 #endif
smaug::InnerProductOp
Implements the inner product operator.
Definition: backend.h:38
smaug::TiledTensor
A multidimensional container of Tensors.
Definition: tensor.h:552
smaug
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Definition: backend.cpp:38
common.h
Utilities for writing and invoking Aladdin kernels from Operators.
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