* 에러
파이토치에서 텐서를 gpu로 옮겨주는 과정인 .to(device)를 실행하면 아래와 같은 에러 발생
에러가 어디서 발생했는지 확인하기 위해, 다음 환경변수를 설정
CUDA_LAUNCH_BLOCKING=1
* 해결 방법
터미널에 다음 명령어 입력
export TORCH_CUDNN_V8_API_DISABLED=1
* Reference
https://github.com/pytorch/pytorch/issues/99372
PyTorch 2.0.0 encountered CUDA error: an illegal memory access was encountered · Issue #99372 · pytorch/pytorch
🐛 Describe the bug Running PyTorch 2.0.0 encountered CUDA error: an illegal memory access was encountered. We wrote a benchmark tool to use pytorch to run inference (See the commands below on how t...
github.com
'Programming Language > Python' 카테고리의 다른 글
[Python] 유용한 string 출력 방법 정리 (0) | 2023.10.29 |
---|---|
[Python] Install mmcv (0) | 2023.07.27 |
ModuleNotFoundError: No module named 'easydict' (0) | 2023.05.14 |
colab 대신 local에서 실행하는 방법 (0) | 2023.05.14 |
[Python] Install PIP3 (0) | 2023.03.07 |