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

fix(megdnn): fix megdnn benchmark testcase

GitOrigin-RevId: 726971474a8b056b7bb42004ae1a89a054562ae6
上级 1d4baa42
...@@ -241,10 +241,14 @@ void benchmark_target_algo(Handle* handle, const std::vector<BenchArgs>& args, ...@@ -241,10 +241,14 @@ void benchmark_target_algo(Handle* handle, const std::vector<BenchArgs>& args,
"v" V(CUDNN_MAJOR) "." V(CUDNN_MINOR) "." V(CUDNN_PATCHLEVEL) "v" V(CUDNN_MAJOR) "." V(CUDNN_MINOR) "." V(CUDNN_PATCHLEVEL)
benchmarker_cudnn.set_before_exec_callback( benchmarker_cudnn.set_before_exec_callback(
conv_bias::ConvBiasAlgoChecker<ConvBiasForward>( conv_bias::ConvBiasAlgoChecker<ConvBiasForward>(
"CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_" ConvBiasForward::algo_name<ConvBias::DefaultParam>(
"GEMM" CUDNN_VERSION_STRING)); "CUDNN:ConvBiasActivation:"
benchmarker_matmul.set_before_exec_callback( "CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_"
AlgoChecker<BatchedMatrixMul>("BRUTE_FORCE-CUBLAS")); "GEMM" CUDNN_VERSION_STRING,
{})
.c_str()));
benchmarker_matmul.set_before_exec_callback(AlgoChecker<BatchedMatrixMul>(
ExecutionPolicyAlgoName{"BRUTE_FORCE", {{"CUBLAS", {}}}}));
benchmarker.set_dtype(0, src_dtype) benchmarker.set_dtype(0, src_dtype)
.set_dtype(1, filter_dtype) .set_dtype(1, filter_dtype)
......
...@@ -41,10 +41,12 @@ TEST_F(CUDA, BENCHMARK_CONVOLUTION_8X8X32) ...@@ -41,10 +41,12 @@ TEST_F(CUDA, BENCHMARK_CONVOLUTION_8X8X32)
auto time_in_ms_float = benchmarker.set_param(param_float) auto time_in_ms_float = benchmarker.set_param(param_float)
.set_dtype(0, dtype::Float32()) .set_dtype(0, dtype::Float32())
.set_dtype(1, dtype::Float32()) .set_dtype(1, dtype::Float32())
.set_dtype(2, dtype::Float32())
.execs({src_float, filter_float, {}}); .execs({src_float, filter_float, {}});
auto time_in_ms_int = benchmarker.set_param(param_int) auto time_in_ms_int = benchmarker.set_param(param_int)
.set_dtype(0, dtype::Int8()) .set_dtype(0, dtype::Int8())
.set_dtype(1, dtype::Int8()) .set_dtype(1, dtype::Int8())
.set_dtype(2, dtype::Int32())
.execs({src_int, filter_int, {}}); .execs({src_int, filter_int, {}});
std::cout << "1x1: N=" << N << " OC=" << OC << " IC=" << IC std::cout << "1x1: N=" << N << " OC=" << OC << " IC=" << IC
<< " H=" << H << " W=" << W << " H=" << H << " W=" << W
...@@ -67,10 +69,12 @@ TEST_F(CUDA, BENCHMARK_CONVOLUTION_8X8X32) ...@@ -67,10 +69,12 @@ TEST_F(CUDA, BENCHMARK_CONVOLUTION_8X8X32)
auto time_in_ms_float = benchmarker.set_param(param_float) auto time_in_ms_float = benchmarker.set_param(param_float)
.set_dtype(0, dtype::Float32()) .set_dtype(0, dtype::Float32())
.set_dtype(1, dtype::Float32()) .set_dtype(1, dtype::Float32())
.set_dtype(2, dtype::Float32())
.execs({src_float, filter_float, {}}); .execs({src_float, filter_float, {}});
auto time_in_ms_int = benchmarker.set_param(param_int) auto time_in_ms_int = benchmarker.set_param(param_int)
.set_dtype(0, dtype::Int8()) .set_dtype(0, dtype::Int8())
.set_dtype(1, dtype::Int8()) .set_dtype(1, dtype::Int8())
.set_dtype(2, dtype::Int32())
.execs({src_int, filter_int, {}}); .execs({src_int, filter_int, {}});
std::cout << "chanwise: N=" << N << " C=" << C std::cout << "chanwise: N=" << N << " C=" << C
<< " H=" << H << " W=" << W << " F=" << F << " H=" << H << " W=" << W << " F=" << F
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册