提交 16f052e9 编写于 作者: L luzzyzhang 提交者: Xinran Xu

fix(megdnn): change ver 60 to use cuda capability 50

fix(megdnn): if compute capability less than 60 skip fp16 test
上级 c4dfdbd2
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "test/common/convolution.h" #include "test/common/convolution.h"
#include "test/common/rng.h" #include "test/common/rng.h"
#include "test/cuda/benchmark.h" #include "test/cuda/benchmark.h"
#include "test/cuda/utils.h"
#include "src/cuda/utils.h" #include "src/cuda/utils.h"
...@@ -203,6 +204,7 @@ TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA) ...@@ -203,6 +204,7 @@ TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA)
.set_epsilon(1e-3) .set_epsilon(1e-3)
.set_param(arg.param) .set_param(arg.param)
.exec(TensorLayoutArray{filter, dst, src}); .exec(TensorLayoutArray{filter, dst, src});
if (!megdnn::test::check_compute_capability(6, 0)) {
src.dtype = dst.dtype = filter.dtype = dtype::Float16(); src.dtype = dst.dtype = filter.dtype = dtype::Float16();
checker.set_rng(0, &rng) checker.set_rng(0, &rng)
.set_rng(1, &rng) .set_rng(1, &rng)
...@@ -216,6 +218,7 @@ TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA) ...@@ -216,6 +218,7 @@ TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA)
.set_param(arg.param) .set_param(arg.param)
.exec(TensorLayoutArray{filter, dst, src}); .exec(TensorLayoutArray{filter, dst, src});
} }
}
} }
TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA_FAILED_CUDNN7_5) TEST_F(CUDA, CONVOLUTION_BACKWARD_DATA_FAILED_CUDNN7_5)
......
...@@ -49,7 +49,7 @@ HalideCudaTargetTrait::FeatureSet HalideCudaTargetTrait::features( ...@@ -49,7 +49,7 @@ HalideCudaTargetTrait::FeatureSet HalideCudaTargetTrait::features(
set.set(Target::CUDACapability32); set.set(Target::CUDACapability32);
} else if (in(35, 40)) { } else if (in(35, 40)) {
set.set(Target::CUDACapability35); set.set(Target::CUDACapability35);
} else if (in(50, 60)) { } else if (in(50, 61)) {
set.set(Target::CUDACapability50); set.set(Target::CUDACapability50);
} else if (in(61, 70)) { } else if (in(61, 70)) {
set.set(Target::CUDACapability61); set.set(Target::CUDACapability61);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册