NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.17k stars 1.35k forks source link

Whether to support Cuda 12.1 #1748

Open yangzhipeng1108 opened 7 months ago

yangzhipeng1108 commented 7 months ago

torch.version = 2.1.0+cu121

Compiling cuda extensions with nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Fri_Sep__8_19:17:24_PDT_2023 Cuda compilation tools, release 12.3, V12.3.52 Build cuda_12.3.r12.3/compiler.33281558_0 from /usr/local/cuda/bin

/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (2.0.7) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "setup.py", line 178, in check_cuda_torch_binary_vs_bare_metal(CUDA_HOME) File "setup.py", line 40, in check_cuda_torch_binary_vs_bare_metal raise RuntimeError( RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries. Pytorch binaries were compiled with Cuda 12.1. In some cases, a minor-version mismatch will not cause later errors: https://github.com/NVIDIA/apex/pull/323#discussion_r287021798. You can try commenting out this check (at your own risk).

tiandiao123 commented 6 months ago

do you have some ways to fix this? I have a similar problem over here.

CTW20191008 commented 5 months ago
conda install packaging
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./

These work for me. Good luck.

zhongyu-zhao commented 4 months ago

Thanks very much! This works for me.

jiayoujiayoujiayoua commented 3 weeks ago
conda install packaging
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./

These work for me. Good luck.

Thanks, this works for me, too

kkk935208447 commented 2 days ago

Thanks, this works for me