提交 a1cba6cc 编写于 作者: M Megvii Engine Team

fix(dnn): fix convbias crash on X86

GitOrigin-RevId: 3b33c83d0317475dc1105146a4a9d62fd99b5506
上级 9b4cd92b
...@@ -377,6 +377,15 @@ bool ConvBiasImpl::AlgoIm2col::usable( ...@@ -377,6 +377,15 @@ bool ConvBiasImpl::AlgoIm2col::usable(
} }
#endif #endif
//! 8x8x32 and 8x8x8 and NO_PACK is not supported
if (matmul_desc.packmode == Pack_Mode::NO_PACK &&
param.src_type.enumv() == DTypeEnum::QuantizedS8 &&
param.bias_type.enumv() == DTypeEnum::QuantizedS32 &&
(param.dst_type.enumv() == DTypeEnum::QuantizedS8 ||
param.dst_type.enumv() == DTypeEnum::QuantizedS32)) {
return false;
}
//! make sure 8x8x16 and 8x8x32 biasmode is nobias and nonlineMode is //! make sure 8x8x16 and 8x8x32 biasmode is nobias and nonlineMode is
//! identity otherwise return false mean that 8x8x32 and 8x8x16 not //! identity otherwise return false mean that 8x8x32 and 8x8x16 not
//! support PostProcess //! support PostProcess
......
...@@ -963,7 +963,7 @@ TEST_F(X86_MULTI_THREADS, CONV_BIAS_IM2COLMATMUL_INT8X8X32_FILTER_PREPROCESS) { ...@@ -963,7 +963,7 @@ TEST_F(X86_MULTI_THREADS, CONV_BIAS_IM2COLMATMUL_INT8X8X32_FILTER_PREPROCESS) {
#if MEGDNN_X86_WITH_MKL_DNN #if MEGDNN_X86_WITH_MKL_DNN
if (megdnn::x86::is_supported(x86::SIMDType::VNNI)) { if (megdnn::x86::is_supported(x86::SIMDType::VNNI)) {
cb("IM2COLMATMUL:X86_INT8X8X32_MKLDNN"); cb("IM2COLMATMUL");
} }
#endif #endif
#if MEGDNN_X86_WITH_VNNI #if MEGDNN_X86_WITH_VNNI
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册