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