diff --git a/paddle/fluid/platform/gpu_info.cc b/paddle/fluid/platform/gpu_info.cc index ea4c78e89a686a88a274500f81ced810010cc25d..179b1b955f126722a1ba5c2f69ca31845c714302 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[10] = "helloworld"; + char c[] = "helloworld"; PADDLE_ENFORCE(cudaGetDeviceProperties(&device_prop, id), a, c); return device_prop.major * 10 + device_prop.minor; }