RTX3090踩坑实录-在配置pytorch3d遇到的问题

RTX3090踩坑实录-在配置pytorch3d遇到的問題

官方安裝:https://github.com/facebookresearch/pytorch3d/blob/v0.3.0/INSTALL.md

archive:https://pytorch.org/get-started/previous-versions/

详细系统环境见后文:
总结:只能pip pytorch,使用cub版本10.0, python3.8+

GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation

  • 原来的步骤
    • 按照原來的文檔指示py=3.7
    • pip install torch1.6.0 torchvision0.7.0、
    • conda install -c conda-forge -c fvcore fvcore
    • conda install -c bottler nvidiacub
    • curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz
    • tar xzf 1.10.0.tar.gz
    • export CUB_HOME=$PWD/cub-1.10.0
    • conda install pytorch3d -c pytorch3d
    • 报错:与3090不兼容
  • 参考文档:https://www.cnblogs.com/pikachuuuuu/p/15126905.html

OSError: undefined symbol: free_gemm_select, version libcublasLt.so.11

  • 改成py=3.8

  • 然后还是按原来的步骤

  • 报错
    -参考文档
    https://discuss.pytorch.org/t/oserror-undefined-symbol-free-gemm-select-version-libcublaslt-so-11/113487

    https://github.com/pytorch/pytorch/issues/51080

  • 后面改用pip

    • pip install torch1.8.1+cu111 torchvision0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
      后面参考的文档https://blog.csdn.net/weixin_40022595/article/details/115359656
    • 修改过程
      • pip上面的版本

      • pip install -r requirements.txt

      • pip install fvcore
        CUB的release版本用最新的链接:https://github.com/NVIDIA/cub/releases
        https://github.com/NVIDIA/cub/archive/refs/tags/1.16.0.tar.gz

      • 替换下面对应的内容

        curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz
        tar xzf 1.10.0.tar.gz
        export CUB_HOME=$PWD/cub-1.10.0
        
      • pip install ‘git+https://github.com/facebookresearch/pytorch3d.git’

      • pip install ‘git+https://github.com/facebookresearch/pytorch3d.git@stable’

fatal error: cuda_runtime_api.h: 没有那个文件或目录

  • 参考文档:https://blog.csdn.net/walker0001/article/details/115460741
  • sudo apt-get install nvidia-cuda-toolkit
  • 报下面的错

:/usr/local/cuda-11.4/bin/nvcc’: No such file or directory

  • 查看自己的环境
    RTX3090踩坑实录-在配置pytorch3d遇到的问题_第1张图片

    这里显示是cuda11.4
    RTX3090踩坑实录-在配置pytorch3d遇到的问题_第2张图片

    nvcc -V与smi信息不一致,但似乎可以,参考这篇:https://blog.csdn.net/sophicchen/article/details/120782209

    • 查看环境变量:
      RTX3090踩坑实录-在配置pytorch3d遇到的问题_第3张图片

      export CUDA_HOME=/usr/local/cuda-11.4
      gedit ~/.bashrc 查看路径是不是加进去了
      请添加图片描述

一堆问题

居然还有这种错误
RTX3090踩坑实录-在配置pytorch3d遇到的问题_第4张图片

降cub版本回到10.0

成功

在这里插入图片描述

你可能感兴趣的:(Pytorch相关,python,pytorch)