1ytic / warp-rnnt

CUDA-Warp RNN-Transducer
MIT License
211 stars 40 forks source link

Issues with non-standard CUDA install #6

Closed StarDuster closed 4 years ago

StarDuster commented 4 years ago

I tried to install espnet (depends on warp-rnnt) on HPC (which CUDA path is in /apps/t3/sles12sp2/cuda/10.0.130, after I exported $CUDA_HOME in the install script), I always run into Exception("CPU version is not implemented")

I found that in warp-rnnt/pytorch_binding/setup.py line 21: if not torch.cuda.is_available():

I think it should be:

if not ("CUDA_HOME" in os.environ or torch.cuda.is_available()):
    raise xxxx

or something else.

Is it always mean CUDA is not unavailable when torch.cuda.is_available() return False? I'm not an expert of PyTorch so I'm not sure, but I saw https://github.com/pytorch/pytorch/blob/master/torch/utils/cpp_extension.py shows No CUDA runtime is found only if neither cuda_home was found nor torch.cuda.is_available() is True.

I don't think it was a dependency issue but just in case I'm using: Python 3.7.9, PyTorch 1.3.1, espnet 0.9.4 (and other packages was installed automatically by Makefile of espnet)

1ytic commented 4 years ago

@StarDuster thanks for issue. Could you find how Espnet install PyTorch? Maybe the issue with CPU-only PyTorch?

StarDuster commented 4 years ago

it just git clone and then cd warp-rnnt/pytorch_binding && python3 setup.py install The compiling job and training job may on different nodes of HPC so can the code compiled without GPU?

1ytic commented 4 years ago

I don't think so. Perhaps you can provide your own torch and cuda library path, but I'm not sure if that will work.

StarDuster commented 4 years ago

OK, I see, thanks for your response! But perhaps you can make some effort to support to build the project without GPU, I think running this project on HPC may be a pretty frequent demand.