-
Notifications
You must be signed in to change notification settings - Fork 548
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
* 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>
* 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 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.