← 返回首页
Make cudnn dependency optional by syurkevi · Pull Request #2836 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Make cudnn dependency optional#2836

Merged
umar456 merged 5 commits into
arrayfire:masterfrom
syurkevi:cudnn_dep
Apr 13, 2020
Merged

Make cudnn dependency optional#2836
umar456 merged 5 commits into
arrayfire:masterfrom
syurkevi:cudnn_dep

Conversation

Copy link
Copy Markdown
Contributor

This PR removes the need for an installed cuDNN library when building ArrayFire.
The new fallback methods match those in the opencl backend and determine the gradients through the wrap/unwrap methods.

Copy link
Copy Markdown
Member

9prady9 left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Some style and code organization changes are needed.

I think it would it be beneficial if we just use the non cuDNN implementation as fallback when cuDNN isn't available at runtime.

We can just rename the convolveNN_base.cpp file as convolveNN_fallback.cpp and avoid the cmake changes (extra WITH_CUDNN definition and all cascading changes due to addition of WITH_CUDNN) completely.

Also, please fix the formatting too.

Comment thread src/backend/cuda/CMakeLists.txt Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/CMakeLists.txt Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/convolveNN_base.cpp Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/convolveNN_base.cpp Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/convolveNN_base.cpp Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/convolveNN_cudnn.cpp Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/convolveNN_cudnn.cpp Outdated Show resolved Hide resolved
Comment thread src/backend/cuda/wrap.cpp Show resolved Hide resolved
umar456 added this to the 3.7.2 milestone Apr 12, 2020
Copy link
Copy Markdown
Member

9prady9 left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Looks good. I am re-running the one failed job (ci/win-cuda-k5000), will merge once it goes green.

umar456 merged commit fc99193 into arrayfire:master Apr 13, 2020
9prady9 deleted the cudnn_dep branch April 13, 2020 11:20
umar456 added a commit to umar456/arrayfire that referenced this pull request Jun 27, 2020
* adds fallback for convolveNN functions * adds cudnn option, runtime fallback * Noexcept and const many Dependency module functions * Refactor cuDNN code in CMake * Fix fallback logic. refactor cuDNN util functions. Fix f16 wrap Co-authored-by: Umar Arshad <umar@arrayfire.com>
umar456 mentioned this pull request Jun 27, 2020
2 tasks
9prady9 pushed a commit that referenced this pull request Jun 27, 2020
* adds fallback for convolveNN functions * adds cudnn option, runtime fallback * Noexcept and const many Dependency module functions * Refactor cuDNN code in CMake * Fix fallback logic. refactor cuDNN util functions. Fix f16 wrap Co-authored-by: Umar Arshad <umar@arrayfire.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Footer

© 2026 GitHub, Inc.