Re: pytorch and CUDA
I created a pytorch-cuda branch in the git repo.
It seems that we also have to package NCCL under nvidia team
before being able to build the cuda variant.
On Wed, 2023-02-15 at 13:22 -0500, M. Zhou wrote:
> Hi Andrius,
>
> 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
>
> Any help is appreciated.
>
>
> On Wed, 2023-02-15 at 17:32 +0200, Andrius Merkys wrote:
> > Hello,
> >
> > I am interested in building and installing pytorch with CUDA support
> > locally for personal use. I noticed there are comments about
> > possibility
> > of pytorch with CUDA in pytorch's files under debian/, but I would
> > like
> > to see a branch in salsa repository which would build it with CUDA
> > support.
> >
> > Has anyone succeeded in building pytorch with CUDA? Would there be an
> > interest of having CUDA-enabled salsa branch to build such unofficial
> > Debian packages for personal use?
> >
> > Best,
> > Andrius
> >
>
>
Reply to: