Skip to content

Add support to cuDNN Dependency module to load verion 8 when available #2963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Jul 5, 2020

Description

Fixes: #2935

Changes to Users

None

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass - Locally yes with CUDA 10.2 and cuDNN 8.0.1.
  • [ ] Functions added to unified API
  • [ ] Functions documented

@9prady9
Copy link
Member Author

9prady9 commented Jul 6, 2020

@umar456 Wouldn't it be valid to lookup only versions same or earlier to the one current build is built with ?

diff --git a/src/backend/cuda/cudnnModule.cpp b/src/backend/cuda/cudnnModule.cpp
index b76b0c65f..c1c6ab0b1 100644
--- a/src/backend/cuda/cudnnModule.cpp
+++ b/src/backend/cuda/cudnnModule.cpp
@@ -27,7 +27,10 @@ namespace cuda {
 // clang-format off
 // Latest version from each minor releases are enlisted below
 constexpr std::array<common::Version, 11> cudnnVersions = {
+#if CUDNN_VERSION >= 8000
     make_tuple(8, 0,  1),
+#endif
+#if CUDNN_VERSION >= 7000
     make_tuple(7, 6,  5),
     make_tuple(7, 5,  1),
     make_tuple(7, 4,  2),
@@ -35,8 +38,13 @@ constexpr std::array<common::Version, 11> cudnnVersions = {
     make_tuple(7, 2,  1),
     make_tuple(7, 1,  4),
     make_tuple(7, 0,  5),
+#endif
+#if CUDNN_VERSION >= 6000
     make_tuple(6, 0, 21),
+#endif
+#if CUDNN_VERSION >= 5000
     make_tuple(5, 1, 10),
+#endif
     make_tuple(4, 0,  7)
 };
 // clang-format on

umar456
umar456 previously approved these changes Jul 6, 2020
Adds runtime support for cuDNN 8
@umar456 umar456 merged commit 7bea308 into arrayfire:master Jul 7, 2020
@9prady9 9prady9 deleted the cudnn8 branch July 7, 2020 02:12
@9prady9 9prady9 added this to the 3.7.2 milestone Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Build] cudnn 8 can't be found
2 participants