fix bug when CUDA_HOME is None
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 out of curiosity, which features would you use after CPU-only installation?
@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.
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