From 764cea0c1c3897ece70dc05cabdb297bca715216 Mon Sep 17 00:00:00 2001 From: pangyoki Date: Mon, 7 Nov 2022 11:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Cherry-pick=20PR47666=E3=80=91add=20cu?= =?UTF-8?q?dnn=20error=20if=20compiled=20cudnn=20version=20is=20incompatib?= =?UTF-8?q?le=20with=20installed=20cudnn=20version=20(#47673)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 Co-authored-by: xiongkun Co-authored-by: feifei-111 --- paddle/phi/backends/gpu/gpu_resources.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/paddle/phi/backends/gpu/gpu_resources.cc b/paddle/phi/backends/gpu/gpu_resources.cc index 0257139914..4d2621cb6a 100644 --- a/paddle/phi/backends/gpu/gpu_resources.cc +++ b/paddle/phi/backends/gpu/gpu_resources.cc @@ -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 } -- GitLab