NVIDIA / apex

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

install bug with pytorch2.0.1 #1834

Open Duanjinyi1 opened 3 months ago

Duanjinyi1 commented 3 months ago

Describe the Bug 12 errors detected in the compilation of "csrc/update_scale_hysteresis.cu". /opt/anaconda3/envs/torch200/lib/python3.8/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) /opt/anaconda3/envs/torch200/lib/python3.8/site-packages/torch/utils/cpp_extension.py:398: UserWarning: There are no g++ version bounds defined for CUDA version 11.8 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1 error: subprocess-exited-with-error

× Building wheel for apex (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/anaconda3/envs/torch200/bin/python /opt/anaconda3/envs/torch200/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmp9p1krznp cwd: /root/Desktop/apex Building wheel for apex (pyproject.toml) ... error ERROR: Failed building wheel for apex Failed to build apex ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (apex) Doubtful: Possibly incompatible with pytorch version, as I installed it successfully on pytorch 2.1.0, but my model needs pytorch 2.0.1 for me to install DCNv2

Environment cuda 11.8 pytorch 2.0.1 python 3.8.19 ubuntu20.04 Versions of relevant libraries: [pip3] numpy==1.24.4 [pip3] torch==2.0.1+cu118 [pip3] torchaudio==2.0.2+cu118 [pip3] torchvision==0.15.2+cu118 [conda] torch 2.0.1+cu118 pypi_0 pypi [conda] torchaudio 2.0.2+cu118 pypi_0 pypi [conda] torchvision 0.15.2+cu118 pypi_0 pypi

lix19937 commented 1 month ago

There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}

root cause.