参考https://zhuanlan.zhihu.com/p/80386137
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option=“–pyprof” --global-option=“–cpp_ext” --global-option=“–cuda_ext” ./
就可以了
我最初用的python setup.py install 替换的上述第三步,报错了,导致apex没有cuda版本…
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./