硬件和算子
SEP: Single Element Processor
SEP处理的算子有:
nn.vacc_sep_begin
nn.vacc_sep_end
nn.vacc_cdma
2个输入参数的算子
nn.vacc_quantize
nn.vacc_dequantize
affine
multiply
add
nn.bias_add
nn.prelu
vacc_activation
1个输入参数的算子
nn.relu
nn.leaky_relu
PEP: Planar Element Processor
PEP处理的算子有
nn.max_pool2d
nn.vacc_dropout
CE:Convolution Engine
ODMA
DSP
nn.softmax
nn.avg_pool2d
nn.global_avg_pool2d
PAD
Flatten
nn.batch_flatten
算子和pipeline的关系
pipeline跟硬件对应的,如:CE(conv2d, GEMM), SEP(element-wise乘和加, bias add, relu, leak relu, affine, vacc_activation, quantize and dequantize, normalization), PEP(maxpooling, dropout), pipeline就是硬件在不进行数据写入写出的情况下的一次计算。所以一个pipeline一般开始都是一个convolution。