From bc8160350b9375ce4a96b6e3927acd2fd9e74c9b Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 3 May 2018 13:41:19 +0800 Subject: [PATCH] Fix compile --- paddle/fluid/operators/math/math_function_test.cu | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/operators/math/math_function_test.cu b/paddle/fluid/operators/math/math_function_test.cu index eb6b77f9583..3d03981b9f8 100644 --- a/paddle/fluid/operators/math/math_function_test.cu +++ b/paddle/fluid/operators/math/math_function_test.cu @@ -279,8 +279,9 @@ TEST(math_function, gemm_notrans_cublas_fp16) { paddle::platform::float16* c = input3_gpu.mutable_data(gpu_place); - GetBlas(context).GEMM(false, false, m, n, k, float16(1), a, 3, b + 1, - 4, float16(1), c + 1, 4); + GetBlas(context).GEMM( + false, false, m, n, k, static_cast(1), a, 3, + b + 1, 4, static_cast(1), c + 1, 4); paddle::framework::TensorCopySync(input3_gpu, cpu_place, &input3); @@ -388,12 +389,9 @@ TEST(math_function, gemm_trans_cublas_fp16) { paddle::platform::float16* c = input3_gpu.mutable_data(gpu_place); - GetBlas(context).GEMM(false, true, m, n, k, float16(1), a, 3, b + 3, - 3, float16(1), c + 1, 4); - paddle::operators::math::gemm( - context, false, true, m, n, k, paddle::platform::float16(1), a, 3, b + 3, - 3, paddle::platform::float16(1), c + 1, 4); + GetBlas(context).GEMM( + false, true, m, n, k, static_cast(1), a, 3, + b + 3, 3, static_cast(1), c + 1, 4); paddle::framework::TensorCopySync(input3_gpu, cpu_place, &input3); -- GitLab