Skip to content

Commit 764cea0

Browse files
pangyoki2742195759feifei-111
authored
【Cherry-pick PR47666】add cudnn error if compiled cudnn version is incompatible with installed cudnn version (#47673)
* Cherry-pick PR47666, add cudnn error (#47666) * [CherryPick] Cherry pick #45916 #46031 #47299 (#47610) * [ Dy2Static ] Fix bugs when select inputs meeting different shape or undefined-var (#45916) * fix select_input with different shape errors: 1. select_input_with_buildin_type directly return non-undefinedvar branch when meeting undefined var 2. the output shape of select_input is inferred from inputs. * reverse the logic in select_input * [warning] added warning message in cond block when one branch returns variable and another returns None (#46031) * [cherry-pick] Allow manaully set py_reader name in standalone executor (#45898) (#45931) * Allow manaully set py_reader name in standalone executor * [BugFix] while cond receives dict as input (#47299) * fix bugs while cond receives dict as input * add unittest * change flatten -> _is_sequence_except_dict * code format Co-authored-by: feifei-111 <[email protected]> Co-authored-by: xiongkun <[email protected]> Co-authored-by: feifei-111 <[email protected]>
1 parent 58c47e8 commit 764cea0

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)