question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not bundle cuDNN v8 for CUDA 10.1/10.2/11.0 packages

See original GitHub issue

We’re now discussing removal of bundled cuDNN in CuPy wheels hosted on PyPI. This is because cuDNN v8 is quite huge (1.5GB) and not reasonable to redistribute on our own.

This affects:

  • CUDA 10.1/10.2 wheels for CuPy v8
  • CUDA 11.0 wheels for CuPy v7 and v8

Requirements

  1. Load shared libraries placed outside of the package
  2. (optionally) Provide means to download cuDNN automatically

Implementation

Requirement 1

  • Before loading cupy_backends,
    • Find the library from search paths in the following order:
      • ~cupy/_data/lib (shared libaries bundled in wheels)~ update: this is not needed as cuDNN binary is not located here
      • CUPY_LIBRARY_PATH env var
      • default system search path
    • If the library is found, dlopen the library. Otherwise, show a warning (please install the lib manually) to users on the initial use of each library.

Requirement 2

  • Users run python -m cupyx.utils.download_cudnn cuda_version
  • Download cuDNN binary to e.g. ~/.cupy/cuda_libs/{cuda_version}/{library_name}/{library_version}/lib/libcudnn.so.8.0.2

If we provide this implementation, we should add ~/.cupy/cuda_libs/{cuda_version}/{library_name}/{library_version}/lib to search path in requirement 1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kmaehashicommented, Aug 5, 2020

can we add https://github.com/unnonouno/cudnnenv as a requirement and call it from setup.py?

I come up with that idea too, but cudnnenv does not support Windows. Also, wheel installations does not invoke setup.py, so cudnn download should be done by users (or maybe automatically by CuPy)

1reaction
leofangcommented, Aug 5, 2020

@jakirkham, I don’t think Anaconda has packaged cuDNN v8, nor would this have impact to conda releases (conda’s cuDNN would be found when searching “default system path” in Requirement 1). Just FYI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cuDNN Archive - NVIDIA Developer
NVIDIA cuDNN is a GPU-accelerated library of primitives for deep neural networks. Download cuDNN v8.6.0 (October 3rd, 2022), for CUDA 11.x ...
Read more >
Install CUDA and CUDNN on Windows & Linux - Medium
If you do not have an account, create one. Since I have CUDA 11.0.1, I will download cuDNN 8.0.5 for CUDA 11.0. Click...
Read more >
Installing Multiple CUDA & cuDNN Versions in Ubuntu
You can see the Nvidia configurations printed. Note, the CUDA version displayed on the top right corner is the driver version. Not the...
Read more >
Is it still necessary to install CUDA before using the conda ...
I see that installing tensorflow-gpu automatically triggers the installation of the cudatoolkit and cudnn. Does this mean that I no longer need ...
Read more >
Upgrade Guide — CuPy 11.4.0 documentation
This replaces per-CUDA version binary packages ( cupy-cuda112 ~ cupy-cuda117 ). ... variable can be used to override cuDNN / NCCL libraries bundled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found