SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
b
c
d
f
g
i
k
m
n
q
r
s
t
u
v
w
Functions
b
c
d
f
g
i
m
q
r
s
v
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Functions
a
c
d
e
f
g
i
j
m
o
p
r
s
t
u
v
w
Variables
a
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
Functions
Typedefs
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
smaug
operators
smv
smv_convolution_op.h
1
#ifndef _OPERATORS_SMV_SMV_CONVOLUTION_OP_H_
2
#define _OPERATORS_SMV_SMV_CONVOLUTION_OP_H_
3
4
#include "smaug/core/backend.h"
5
#include "
smaug/operators/common.h
"
6
#include "smaug/operators/convolution_op.h"
7
8
namespace
smaug
{
9
10
namespace
smv {
12
namespace
conv {
13
14
extern
const
int
kNumPEs;
15
extern
const
int
kNumMaccsPerPE;
16
17
class
TilingOptimizer;
18
19
}
// namespace conv
20
}
// namespace smv
21
27
class
SmvConvolutionOp
:
public
ConvolutionOp
<SmvBackend> {
28
public
:
29
using
ConvolutionOp<SmvBackend>::ConvolutionOp
;
30
void
tile()
override
;
31
void
run()
override
;
32
friend
class
smv::conv::TilingOptimizer
;
33
34
protected
:
38
void
runNHWC
(
TiledTensor
& inputs,
39
TiledTensor
& weights,
40
TiledTensor
& outputs);
41
std::unique_ptr<volatile int> invokeSystolicArrayKernel(
42
unsigned
accelId,
43
float16* inputs,
44
float16* weights,
45
float16* outputs,
46
int
inputsDims[4],
47
int
weightsDims[4],
48
int
outputsDims[4],
49
int
inputsPad,
50
int
weightsPad,
51
int
outputPad,
52
int
inputHaloPad[4],
53
int
stride,
54
int
ifmapStart,
55
int
kernStart,
56
bool
accumulate,
57
bool
readInputs,
58
bool
readWeights,
59
bool
sendResults,
60
ActivationInfo
* actInfo);
61
62
std::array<TiledTensor, 3> tiledTensors;
63
};
64
65
}
// namespace smaug
66
67
#endif
ActivationInfo
Specifies an activation function and relevant parameters.
Definition:
common.h:210
smaug::smv::conv::TilingOptimizer
Tiling optimizer for SMV convolution kernel.
Definition:
smv_convolution_tiling.h:19
smaug::SmvConvolutionOp::runNHWC
void runNHWC(TiledTensor &inputs, TiledTensor &weights, TiledTensor &outputs)
Tiling scheduler for this operator.
Definition:
smv_convolution_op.cpp:19
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::ConvolutionOp
The base class for all 4D spatial convolution operators.
Definition:
backend.h:33
smaug::SmvConvolutionOp
SMV backend implementation of convolution.
Definition:
smv_convolution_op.h:27
Generated by
1.8.18