Skip to content

Commit

Permalink
Cherry-pick PR47666, add cudnn error (PaddlePaddle#47666)
Browse files Browse the repository at this point in the history
  • Loading branch information
pangyoki committed Nov 4, 2022
1 parent 72e1eb6 commit e1132f4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions paddle/phi/backends/gpu/gpu_resources.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@ void InitGpuProperties(Place place,
<< "Please recompile or reinstall Paddle with compatible CUDA "
"version.";
}

auto local_cudnn_version = cudnn_dso_ver / 1000;
auto compile_cudnn_version = CUDNN_VERSION / 1000;
PADDLE_ENFORCE_EQ(
compile_cudnn_version,
local_cudnn_version,
phi::errors::InvalidArgument(
"The installed Paddle is compiled with CUDNN "
"%d, but CUDNN version in your machine is %d. "
"which will cause serious incompatible bug. "
"Please recompile or reinstall Paddle with compatible CUDNN "
"version.",
compile_cudnn_version,
local_cudnn_version));
#endif
}

Expand Down

0 comments on commit e1132f4

Please sign in to comment.