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

fix(dnn/cuda): disable cudnn conv_bias kernels for NCHW4_NCHW tensor format

due to illegal memory access errors caused by the kernels

GitOrigin-RevId: 584cedeeab86034ca527ba69162df538e01a9460
上级 2e4b9a42
......@@ -34,7 +34,10 @@ bool ConvBiasForwardImpl::AlgoCUDNNConvBiasActivation::is_available(
return false;
}
auto&& param = args.opr->param();
if (param.format == param::ConvBias::Format::NCHW4_NCHW32 ||
//! FIXME: conv kernel of cudnn for NCHW4_NCHW tensor format causes illegal
//! memory access errors, so we have to disable this kernel here.
if (param.format == param::ConvBias::Format::NCHW4_NCHW ||
param.format == param::ConvBias::Format::NCHW4_NCHW32 ||
param.format == param::ConvBias::Format::NCHW32_NCHW4)
return false;
if (param.format == param::ConvBias::Format::NCHW &&
......
......@@ -456,6 +456,9 @@ TEST_F(CUDA, CONV_BIAS_FORWARD_NCHW4) {
checker.exec({{1, 4, 2, 2, 4}, {16, 4, 3, 3, 4}, {1, 4, 1, 1, 4}, {}, {}});
}
//! FIXME: conv kernel of cudnn for NCHW4_NCHW tensor format causes illegal
//! memory access errors, so we have to disable this test here.
#if 0
TEST_F(CUDA, CONV_BIAS_FORWARD_NCHW4_NCHW) {
require_compute_capability(6, 1);
using namespace conv_bias;
......@@ -511,6 +514,7 @@ TEST_F(CUDA, CONV_BIAS_FORWARD_NCHW4_NCHW) {
checker.set_param(param);
checker.exec({{1, 4, 2, 2, 4}, {16, 4, 3, 3, 4}, {1, 16, 1, 1}, {}, {}});
}
#endif
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册