apex icon indicating copy to clipboard operation
apex copied to clipboard

ValueError: Unknown CUDA arch (3.0) or GPU not supported

Open AVSuni opened this issue 7 years ago • 1 comments

Hi,

I am trying to build Apex in Docker environment with Ubuntu 16.04 and Cuda 10.1. Nvidia (devel) base image.

I get the following error:

raise ValueError("Unknown CUDA arch ({}) or GPU not supported".format(arch)) ValueError: Unknown CUDA arch (3.0) or GPU not supported Running setup.py install for apex ... error Cleaning up... Removing source in /tmp/pip-req-build-29ip2wwb Removed build tracker '/tmp/pip-req-tracker-jze5gyal' ERROR: Command errored out with exit status 1: /usr/local/conda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-29ip2wwb/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-29ip2ww b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' --cpp_ext --cuda_ext install --record /tmp /pip-record-zdm26ll0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Here is my ~/.bashrc:

export CUDA_HOME=/usr/local/cuda-10.1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.1/lib64 export TORCH_CUDA_ARCH_LIST="3.0;3.2;3.5;3.7;5.0;5.2;5.3;6.0;6.1;6.2;7.0;7.2;7.5"

And the output of conda list | grep cuda

cudatoolkit 10.1.168 0 pytorch 1.3.0 py3.7_cuda10.1.243_cudnn7.6.3_0 pytorch

AVSuni avatar Nov 20 '19 08:11 AVSuni

Solved by modifying cuda arch list in /usr/local/conda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py

I added 3.0 and 3.2 to the list

AVSuni avatar Nov 20 '19 12:11 AVSuni