Skip to content

Make cudnn dependency optional #2836

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 5 commits into from
Apr 13, 2020
Merged

Make cudnn dependency optional #2836

merged 5 commits into from
Apr 13, 2020

Conversation

syurkevi
Copy link
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
Member

@9prady9 9prady9 left a comment

Choose a reason for hiding this comment

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

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.

@umar456 umar456 added this to the 3.7.2 milestone Apr 12, 2020
Copy link
Member

@9prady9 9prady9 left a comment

Choose a reason for hiding this comment

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

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

@umar456 umar456 merged commit fc99193 into arrayfire:master Apr 13, 2020
@9prady9 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 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>
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