From 23478a0d53c177950abe06fc0999da8b6cbe6b18 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Thu, 16 Apr 2020 15:42:45 +0800 Subject: [PATCH] test(dnn/cuda): fix cuda int8 test on sm60 GitOrigin-RevId: 66bab333e18a32c1f06a5c2dfd6a01c368b3f674 --- dnn/test/cuda/conv_bias.cpp | 2 +- dnn/test/cuda/matrix_mul.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dnn/test/cuda/conv_bias.cpp b/dnn/test/cuda/conv_bias.cpp index 1460c196..f98e4236 100644 --- a/dnn/test/cuda/conv_bias.cpp +++ b/dnn/test/cuda/conv_bias.cpp @@ -582,7 +582,7 @@ TEST_F(CUDA, CONV_BIAS_FORWARD_MATMUL_1x1) { TEST_F(CUDA, CONV_BIAS_FORWARD_GROUP) { using NLMode = ConvBias::Param::NonlineMode; bool is_int_available = false; - if (megdnn::test::check_compute_capability((6), (0))) { + if (megdnn::test::check_compute_capability(6, 1)) { is_int_available = true; } else { is_int_available = false; diff --git a/dnn/test/cuda/matrix_mul.cpp b/dnn/test/cuda/matrix_mul.cpp index 6909a866..f00e466a 100644 --- a/dnn/test/cuda/matrix_mul.cpp +++ b/dnn/test/cuda/matrix_mul.cpp @@ -129,7 +129,7 @@ TEST_F(CUDA, PEAK_BENCHMARK_MATRIX_MUL_QUANTIZED4x4x32) { #endif TEST_F(CUDA, MATRIX_MUL_INT8x8x32_WITH_SPETIAL_STRIDES) { - if (cuda::current_device_prop().major < 6) { + if (!cuda::is_compute_capability_required(6, 1)) { printf("Skip CUDA.MATRIX_MUL test as current device doesn't support\n"); return; } @@ -151,7 +151,7 @@ TEST_F(CUDA, MATRIX_MUL_INT8x8x32_WITH_SPETIAL_STRIDES) { } TEST_F(CUDA, MATRIX_MUL_INT8x8x32_NAIVE) { - if (cuda::current_device_prop().major < 6) { + if (!cuda::is_compute_capability_required(6, 1)) { printf("Skip CUDA.MATRIX_MUL test as current device doesn't support\n"); return; }