From c2f71d1d3af096ea6aa7b205fb8442fa0b6e4196 Mon Sep 17 00:00:00 2001 From: zhouwei25 Date: Fri, 12 Jul 2019 16:38:21 +0000 Subject: [PATCH] test=develop --- paddle/fluid/platform/gpu_info.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/platform/gpu_info.cc b/paddle/fluid/platform/gpu_info.cc index 08fdb54a614..445eb4a599a 100644 --- a/paddle/fluid/platform/gpu_info.cc +++ b/paddle/fluid/platform/gpu_info.cc @@ -109,7 +109,6 @@ int GetCUDAComputeCapability(int id) { PADDLE_ENFORCE_LT(id, GetCUDADeviceCount(), "id must less than GPU count"); cudaDeviceProp device_prop; auto e = cudaGetDeviceProperties(&device_prop, id); - std::string ErrorLog; std::ostringstream ostr; ostr << "cudaGetDeviceProperties failed in" "paddle::platform::GetCUDAComputeCapability!" @@ -118,8 +117,8 @@ int GetCUDAComputeCapability(int id) { "https://docs.nvidia.com/cuda/cuda-runtime-api/" "group__CUDART__TYPES.html#group__CUDART__TYPES_" "1g3f51e3575c2178246db0a94a430e0038"; - ErrorLog = ostr.str(); - PADDLE_ENFORCE(e, "helllo"); + std::string ErrorLog = ostr.str(); + PADDLE_ENFORCE(e, ErrorLog); return device_prop.major * 10 + device_prop.minor; } -- GitLab