1、参考https://blog.csdn.net/qq_53354720/article/details/142616576,直接去https://www.github.com/nvidia/apex下载apex-master的zip,解压缩放到项目目录里面。
2、参考https://blog.csdn.net/szn1316159505/article/details/137655660和https://blog.csdn.net/starvapour/article/details/122275439这两篇博文,修改apex-master/apex/amp/utils.py
3、
cd apex-master
pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" --no-build-isolation ./