SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
smv_unary_op_common.h
1 #ifndef _OPERATORS_SMV_SMV_UNARY_OP_H_
2 #define _OPERATORS_SMV_SMV_UNARY_OP_H_
3 
4 #include "smaug/core/backend.h"
6 #include "smaug/operators/unary_op.h"
7 
8 namespace smaug {
9 namespace smv {
10 
12 namespace unary {
13 
18 std::pair<activation_type, activation_param_t> getActivationParams(
19  UnaryOp<SmvBackend>* op);
20 
26 void runX(UnaryOp<SmvBackend>* op, TiledTensor& inputs, TiledTensor& outputs);
27 
28 std::array<TiledTensor, 2> doTiling(UnaryOp<SmvBackend>* op,
29  bool copyData = true);
30 
31 void run(UnaryOp<SmvBackend>* op, std::array<TiledTensor, 2>& tiledTensors);
32 
33 } // namespace unary
34 } // namespace smv
35 } // namespace smaug
36 
37 #endif
38 
smaug::smv::unary::runX
void runX(UnaryOp< SmvBackend > *op, TiledTensor &inputs, TiledTensor &outputs)
A generic tile dispatcher for unary operators.
Definition: smv_unary_op_common.cpp:53
smaug::smv::unary::getActivationParams
std::pair< activation_type, activation_param_t > getActivationParams(UnaryOp< SmvBackend > *op)
Extract activation function parameters from the Operator and stores them in the C-style structs for p...
Definition: smv_unary_op_common.cpp:16
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.