diff --git a/paddle/fluid/platform/gpu_info.cc b/paddle/fluid/platform/gpu_info.cc index 7074cf2b1fb66cc9c36ac01e563cce7867487c7c..ea4c78e89a686a88a274500f81ced810010cc25d 100644 --- a/paddle/fluid/platform/gpu_info.cc +++ b/paddle/fluid/platform/gpu_info.cc @@ -110,7 +110,7 @@ int GetCUDAComputeCapability(int id) { cudaDeviceProp device_prop; auto e = cudaGetDeviceProperties(&device_prop, id); int a = 10; - char c = '1'; + char c[10] = "helloworld"; PADDLE_ENFORCE(cudaGetDeviceProperties(&device_prop, id), a, c); return device_prop.major * 10 + device_prop.minor; }