I was slowly pushing this forward (yes, very slow).
Long time ago, building pytorch cuda version is impossible due to
the lack of nvidia-cudnn. At that time I tried to package the upstream
binary but the license terms to be a blocker.
Now, I kept src:nvidia-cudnn a downloader package, and let
it Provides: libcudnn.so . We have enough build dependencies
for the pytorch-cuda variant, but I have not yet tried that.
Things remains to be done for enabling the pytorch-cuda variant:
1. build bin:pytorch-src from src:pytorch. It's beneficial to other
variants like pytorch-rocm. In that case, we can simply reuse
the same source package bin:pytorch-src, and create blank
packages src:pytorch-cuda that Build-Depends: pytorch-src
with CUDA enabled in d/rules.
I have tried this the last year (search for "pytorch-src" in the
git history), but some trivial bug blocked me and I eventually
postponed this attempt.
2. toggle NO_CUDA=0, USE_CUDA=ON, USE_CUDNN=ON.
We may also export CUDA_HOME=/usr to help the cmake
find the nvcc executable.
The expected extra build dependencies are:
nvidia-cuda-toolkit, libcub-dev, nvidia-cudnn