Skip to content

Commit eb9e460

Browse files
authored
add cudnn error (#47666)
1 parent 4a4f3f8 commit eb9e460

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

paddle/phi/backends/gpu/gpu_resources.cc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,20 @@ void InitGpuProperties(Place place,
108108
<< "Please recompile or reinstall Paddle with compatible CUDA "
109109
"version.";
110110
}
111+
112+
auto local_cudnn_version = cudnn_dso_ver / 1000;
113+
auto compile_cudnn_version = CUDNN_VERSION / 1000;
114+
PADDLE_ENFORCE_EQ(
115+
compile_cudnn_version,
116+
local_cudnn_version,
117+
phi::errors::InvalidArgument(
118+
"The installed Paddle is compiled with CUDNN "
119+
"%d, but CUDNN version in your machine is %d. "
120+
"which will cause serious incompatible bug. "
121+
"Please recompile or reinstall Paddle with compatible CUDNN "
122+
"version.",
123+
compile_cudnn_version,
124+
local_cudnn_version));
111125
#endif
112126
}
113127

0 commit comments

Comments
 (0)