Skip to content
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

cuDNN: Provide wrappers for the declarative API #2266

Open
maleadt opened this issue Feb 14, 2024 · 3 comments
Open

cuDNN: Provide wrappers for the declarative API #2266

maleadt opened this issue Feb 14, 2024 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@maleadt
Copy link
Member

maleadt commented Feb 14, 2024

As part of cuDNN 9.0, the old imperative API has been deprecated, while moving towards a new, graph-based declarative API. That means that our wrappers will have to be rewritten. As I'm not familiar with machine learning / NNlib.jl (which I guess these wrappers would need to be compatible with), I'm hoping that people from the ML community could be able to help with this.

cc @ToucheSir @CarloLucibello @mcabbott @DhairyaLGandhi

@maleadt maleadt added enhancement New feature or request help wanted Extra attention is needed labels Feb 14, 2024
@ToucheSir
Copy link
Contributor

ToucheSir commented Feb 14, 2024

I looked into the graph APIs a few months ago for perf- and flexibility-related reasons. The problem I see is that they are lower-level and require far more manual work than the imperative API. There also appear to be exactly zero tutorials or in-depth learning resources on how to use the graph API to accomplish the same functionality as the imperative API? This is less of a problem outside of Julia because NVIDIA provides https://github.com/NVIDIA/cudnn-frontend, but obviously we can't make use of that higher-level C++ layer in Julia.

All this to say that I don't foresee us being able to migrate all of cuDNN.jl to the graph API any time soon. The best we could probably do is fix all the functionality using removed APIs to use just deprecated ones instead before cuDNN 9.0 becomes widespread. In parallel, a good first step to allow people to help with porting imperative -> graph code would be to generate bindings for the graph API (which IIRC existed in v8 as well). Grepping through res/wrap those do not appear to exist right now.

@maleadt
Copy link
Member Author

maleadt commented Feb 15, 2024

Generating bindings is trivial, I'll do that as part of the PR upgrading to cuDNN 9.0 here.

The best we could probably do is fix all the functionality using removed APIs to use just deprecated ones instead before cuDNN 9.0 becomes widespread.

Yep, I don't think we have a problem right now, I just wanted to get some people involved/interested so that we have enough time to adapt before the imperative API inevitably gets removed 🙂

@maleadt
Copy link
Member Author

maleadt commented Feb 15, 2024

The update to CUDNN 9 was easy enough: #2267

That PR includes updated wrappers, including the graph API: https://github.com/JuliaGPU/CUDA.jl/blob/master/lib/cudnn/src/libcudnn.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants