apex icon indicating copy to clipboard operation
apex copied to clipboard

fix bug when CUDA_HOME is None

Open xiawu opened this issue 3 years ago • 3 comments

when install apex on cpu platform(no support CUDA), the installation throw the following error:

Running command python setup.py egg_info Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/home/x/x/apex/setup.py", line 131, in _, bare_metal_version = get_cuda_bare_metal_version(CUDA_HOME) File "/home/x/x/apex/setup.py", line 17, in get_cuda_bare_metal_version raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True) TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

This PR will fix it.

xiawu avatar Mar 13 '23 13:03 xiawu

@xiawu out of curiosity, which features would you use after CPU-only installation?

crcrpar avatar Apr 21 '23 00:04 crcrpar

@xiawu out of curiosity, which features would you use after CPU-only installation?

running some projects that is dependent on apex, such as stable-diffusion. Because my GPU is old and has not enough memory.

xiawu avatar May 02 '23 04:05 xiawu

Error reporting: torch.version = 1.5.0+cu101 usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: no commands supplied

OneQinG12 avatar Jul 02 '23 02:07 OneQinG12