Updating to latest CuDNN without building pytorch from source

I want to update to CuDNN 8.9.6; the version included in a pip build of torch 2.1.1 is 8.9.2. Nowadays, CuDNN is installed as part of a torch pip install using a pip dependency - with torch 2.1.1, the dependency is nvidia-cudnn-cu12== There’s an updated version of this package with the version I want - nvidia-cudnn-cu12== Can I just install this version and expect that it’ll work properly? Or does the version need to exactly match the version that pytorch was built with?

I have tried updating it, and nothing seems broken, but I don’t know how to know if it’s actually using the new version or not.

Updating libs manually by overwriting the files is not supported and might break. If you want to update specific libs, source builds are the recommended approach.