SwinTransformer / Swin-Object Detection 개발환경 설정(CUDA 10.1 에러 디버깅)

HeungJun Kim·2022년 4월 6일
0
post-thumbnail

1. CUDA 10.1 환경에서의 Swin 개발환경 설정

  • 전체적인 과정은 CUDA 11.0 기반의 이전 게시글 과 동일하다.

  • CUDA 10.1에 맞는 torch 버전(낮은버전)을 설치한다.

    $ pip install torch==1.5.0+cu101 torchvision==0.6.0+cu101 torchaudio==0.5.0 -f https://download.pytorch.org/whl/cu101/torch_stable.html

  • 문제는 torch 1.5.0 설치 시 apex 컴파일이 불가능하다는 것.

  • torch 1.5.0에서는 apex 컴파일 시 아래의 오류가 발생한다.

fatal error: ATen/cuda/DeviceUtils.cuh: No such file or directory
  • 오류의 원인은 구버전의 torch와 최신버전의 apex에서 "DeviceUtils.cuh" 파일의 유무에 따른 의존성 에러라고 한다 issue 참고

  • 해결방안 : apex 구버전 롤백 후 컴파일

    $ git checkout f3a960f80244cf9e80558ab30f7f7e8cbf03c0a0
    $ pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

2. mmcv-full 설치

$ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.5.0/index.html

profile
Computer Vision / Object Detection / SW개발

0개의 댓글