Apex安装失败(笔记记录分享)

Apex安装失败(笔记记录)

1. 错误合集

No.1: error detected in the compilation of "csrc/multi_tensor_scale_kernel.cu"

No.2: module 'torch.nn' has no attribute 'backends'

No.3: AttributeError: module 'torch.distributed' has no attribute '_all_gather_base'

No.4: ImportError was: ModuleNotFoundError("No module named 'amp_C'")

No.56789...: 乱七八糟 

2. 解决

  1. 直接delete原本的Apex

  2. 命令

    git clone https://github.com/NVIDIA/apex.git
    cd apex
    git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0
    python setup.py install --cuda_ext --cpp_ext
    pip3 install -v --no-cache-dir ./
    
  3. 勿杠,仅做笔记分享。

  4. 参考文章(反正我也不明白为啥就能运行跑通,多方参考,大力出奇迹):
    https://blog.csdn.net/qq_17783559/article/details/127813381、https://zhuanlan.zhihu.com/p/360412833

你可能感兴趣的:(笔记分享,python,开发语言)