提交 43e040dc 编写于 作者: J jameswu2014 提交者: zhangyang0701

V1-dwconv relu bug for FPGA track (#1624)

* V2-conv-hellocase pass & V1 verify-pass

* V1 paralvl equal to 2

* softmax channel =2 bug

* softmaxbug update2

* io update2

* V1-dwconv relu bug
上级 fceff4ff
...@@ -1000,14 +1000,34 @@ int ComputeDWConv(const struct DWconvArgs &args) { ...@@ -1000,14 +1000,34 @@ int ComputeDWConv(const struct DWconvArgs &args) {
uint64_t image_padleft_skipwindow = uint64_t image_padleft_skipwindow =
(image_skip_window << 32) | image_pad_left; (image_skip_window << 32) | image_pad_left;
uint64_t reg_ActivationArgs = 0;
// active function:{none,leakeyrelu,sigmoid,tanh}
ActivationArgs active_args;
// active_args.activation_type = LEAKYRELU;
active_args.activation_type = args.output.activation.activation_type;
active_args.leaky_relu_negative_slope =
args.output.activation.leaky_relu_negative_slope;
reg_ActivationArgs = (uint64_t(active_args.activation_type) << 32) |
active_args.leaky_relu_negative_slope;
DLOG << " activation_type:" << active_args.activation_type
<< " leaky_relu_negative_slope:"
<< active_args.leaky_relu_negative_slope;
DLOG << " reg_ActivationArgs:" << reg_ActivationArgs;
pthread_mutex_lock(&g_fpgainfo.pe_data->mutex); pthread_mutex_lock(&g_fpgainfo.pe_data->mutex);
if (ERROR == g_fpgainfo.pe_data->pes[PE_IDX_POOLING]->status) { if (ERROR == g_fpgainfo.pe_data->pes[PE_IDX_POOLING]->status) {
ret = -EIO; ret = -EIO;
DLOG << "Conv Status Error!"; DLOG << "DWConv Status Error!";
pthread_mutex_unlock(&g_fpgainfo.pe_data->mutex); pthread_mutex_unlock(&g_fpgainfo.pe_data->mutex);
return ret; return ret;
} }
reg_writeq(reg_ActivationArgs,
REG_ACTIVATION_MODE_AND_LEAKY_RELU_FACTOR); // active functoion
/*restart scale*/ /*restart scale*/
reg_writeq(output_scale, REG_SCALE_PARAMETER); reg_writeq(output_scale, REG_SCALE_PARAMETER);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册