From 0ead25a4ab8bce6f071945082747a782080630ae Mon Sep 17 00:00:00 2001 From: Kaixi Hou Date: Tue, 23 Jan 2024 03:30:19 -0800 Subject: [PATCH] PR #8696: [NVIDIA] Fix XLA build with the new cuDNN Imported from GitHub PR https://github.com/openxla/xla/pull/8696 This PR fixes a couple of minor issues to support the XLA build against the cuDNN v9. cc. @reedwm Copybara import of the project: -- fb0ae743eafea727423dd02736214fc6f31364ee by Kaixi Hou : Fix support to cudnn v9 Merging this change closes #8696 COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/8696 from kaixih:fix_support_cudnn_v9 fb0ae743eafea727423dd02736214fc6f31364ee PiperOrigin-RevId: 600734575 --- xla/service/gpu/conv_algorithm_picker.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xla/service/gpu/conv_algorithm_picker.cc b/xla/service/gpu/conv_algorithm_picker.cc index 8539b9ccd6ef4..0da9a6684dd59 100644 --- a/xla/service/gpu/conv_algorithm_picker.cc +++ b/xla/service/gpu/conv_algorithm_picker.cc @@ -72,7 +72,11 @@ limitations under the License. #if (defined(GOOGLE_CUDA) && GOOGLE_CUDA) #include "third_party/gpus/cudnn/cudnn.h" // IWYU pragma: keep +#if CUDNN_VERSION >= 9000 +#include "third_party/gpus/cudnn/cudnn_ops.h" +#else #include "third_party/gpus/cudnn/cudnn_ops_infer.h" +#endif // CUDNN_VERSION >= 9000 #include "xla/service/gpu/buffer_comparator.h" #include "xla/stream_executor/gpu/redzone_allocator.h" #endif