diff --git a/paddle/fluid/platform/gpu_info.cc b/paddle/fluid/platform/gpu_info.cc index 179b1b955f126722a1ba5c2f69ca31845c714302..4b10efcaf09e7c86a75b1b8ce0b2b10bd6b2589e 100644 --- a/paddle/fluid/platform/gpu_info.cc +++ b/paddle/fluid/platform/gpu_info.cc @@ -111,7 +111,8 @@ int GetCUDAComputeCapability(int id) { auto e = cudaGetDeviceProperties(&device_prop, id); int a = 10; char c[] = "helloworld"; - PADDLE_ENFORCE(cudaGetDeviceProperties(&device_prop, id), a, c); + string str = "helloworld"; + PADDLE_ENFORCE(cudaGetDeviceProperties(&device_prop, id), a, c, str); return device_prop.major * 10 + device_prop.minor; }