NVIDIA / apex

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

An installation problem #1132

Open TD-wzw opened 3 years ago

TD-wzw commented 3 years ago
捕获
ArghyaChatterjee commented 3 years ago

I am also having the same issue. Any kind of help is appreciated.

zwenyuan1 commented 3 years ago

me too

liuyuan000 commented 3 years ago

me too

zwenyuan1 commented 3 years ago

if you input "nvcc -V ", your output must be "cuda 10.1", so you can try to uninstall the cuda 10.2, and install a cuda 10.1 in conda virtual environment.

ArghyaChatterjee commented 3 years ago

Hi @zwenyuan1 , I don't think that's a good option to remove and reinstall cuda 10.1. I have cuda 10.2 installed and a pytorch version of 1.6.0 + cu101. I can install it successfully now. The issue seems to resolved for me once I comment out line 101-107 inside setup.py file. The main problem is that it tries to check the version of pytorch (bare_metal_version) installed inside our local pc and by commenting out those lines, we are suppressing apex to not check for the pytorch version locally installed. Commenting those lines are fine according to the comment made inside setup.py file by the author. Hope this helps for everyone !!

liuyuan000 commented 3 years ago

setup.py里面的 check_cuda_torch_binary_vs_bare_metal函数进行更改,直接return

https://img-blog.csdnimg.cn/36929ae99a164c7cb923209ddda64f96.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQwNjA4NzMw,size_16,color_FFFFFF,t_70#pic_center

then: pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

TD-wzw commented 3 years ago

Thank you all for your help