提交 f30ae5ff 编写于 作者: C chenjiaoAngel

add gemm+relu6

上级 a4770bd7
...@@ -264,6 +264,7 @@ void conv1x1s1_gemm_int8(const int8_t* i_data, ...@@ -264,6 +264,7 @@ void conv1x1s1_gemm_int8(const int8_t* i_data,
} }
bool flag_relu = param.fuse_relu; bool flag_relu = param.fuse_relu;
bool flag_bias = param.bias != nullptr; bool flag_bias = param.bias != nullptr;
auto act_param = param.activation_param;
//! use gemv when the output channel size = 1 //! use gemv when the output channel size = 1
for (int b = 0; b < num; ++b) { for (int b = 0; b < num; ++b) {
// dC // dC
...@@ -294,9 +295,9 @@ void conv1x1s1_gemm_int8(const int8_t* i_data, ...@@ -294,9 +295,9 @@ void conv1x1s1_gemm_int8(const int8_t* i_data,
n, n,
k, k,
flag_bias, flag_bias,
flag_relu,
false, false,
scale_group, scale_group,
act_param,
ctx); ctx);
} }
} }
...@@ -474,6 +475,8 @@ void conv_im2col_gemm_int8(const int8_t* i_data, ...@@ -474,6 +475,8 @@ void conv_im2col_gemm_int8(const int8_t* i_data,
bool flag_relu = param.fuse_relu; bool flag_relu = param.fuse_relu;
bool flag_bias = param.bias != nullptr; bool flag_bias = param.bias != nullptr;
auto act_param = param.activation_param;
int hblock = get_hblock_int8(ctx); int hblock = get_hblock_int8(ctx);
int k_roundup = ROUNDUP(k, KBLOCK_INT8); int k_roundup = ROUNDUP(k, KBLOCK_INT8);
int m_roundup = ROUNDUP(m, hblock); int m_roundup = ROUNDUP(m, hblock);
...@@ -534,9 +537,9 @@ void conv_im2col_gemm_int8(const int8_t* i_data, ...@@ -534,9 +537,9 @@ void conv_im2col_gemm_int8(const int8_t* i_data,
n, n,
k, k,
flag_bias, flag_bias,
flag_relu,
false, false,
scale_group, scale_group,
act_param,
ctx); ctx);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册