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 support #18

Closed
coreylowman opened this issue Dec 14, 2022 · 4 comments · Fixed by #116
Closed

cudnn support #18

coreylowman opened this issue Dec 14, 2022 · 4 comments · Fixed by #116

Comments

@coreylowman
Copy link
Owner

coreylowman commented Dec 14, 2022

See initial discussion in #1 and #16 for wip

On thread safety:

The cuDNN library is thread-safe. Its functions can be called from multiple host threads, so long as the threads do not share the same cuDNN handle simultaneously.
Source

@coreylowman
Copy link
Owner Author

Re thread safety I think if we enforce that the handles are Arc<Mutex<CudnnHandle>>, we should be fine

@M1ngXU
Copy link
Contributor

M1ngXU commented Dec 15, 2022

or just let each thread spawn a new handle (no data is associated to a handle)

@coreylowman
Copy link
Owner Author

@M1ngXU let's split the cudnn pr into a couple separate PRs, so we just have what we need for dfdx:

  1. Add sys.rs/bindgen.sh/result.rs & link to cudnn in build.rs (you already have this in the big PR, just need to split it out)
    1. i think to start we just need to create/destroy handle, cudnnSetStream
  2. Add tensor descriptors cudnnCreateTensorDescriptor, cudnnDestroyTensorDescriptor, cudnnSetTensorNdDescriptor
  3. Add reduction support
  4. Add conv2d support
  5. Add pool2d support

@M1ngXU
Copy link
Contributor

M1ngXU commented Jan 9, 2023

@M1ngXU let's split the cudnn pr into a couple separate PRs, so we just have what we need for dfdx:

  1. Add sys.rs/bindgen.sh/result.rs & link to cudnn in build.rs (you already have this in the big PR, just need to split it out)

    1. i think to start we just need to create/destroy handle, cudnnSetStream
  2. Add tensor descriptors cudnnCreateTensorDescriptor, cudnnDestroyTensorDescriptor, cudnnSetTensorNdDescriptor

  3. Add reduction support

  4. Add conv2d support

  5. Add pool2d support

ok, i'll do number one now

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 a pull request may close this issue.

2 participants