개발 기타

NotImplementedError: Could not run 'aten::empty_strided' with arguments from the 'CUDA' backend.

begong 2024. 4. 8. 22:35
반응형

파이토치를 활용해 인공지능 연산을 돌리려다 마주친 에러

 

해결방법

 

1.CUDA 및 CUDNN 설치

컴퓨터에서 처음으로 연산을 돌리기 때문에 초기 설치해주었다.

 

--그래도 계속해서 에러가 발행함

 

https://blog.csdn.net/m0_55260921/article/details/121579076

 

关于pytorch的问题(RuntimeError: Could not run ‘aten::empty_strided‘ with arguments from the ‘CUDA‘ backe)_could

 在运行已训练好的模型时,出现了一下错误: RuntimeError: Could not run 'aten::empty_strided' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/

blog.csdn.net

중국 블로그 참조해서 답을 얻음

 

PYTORCH가 CPU버전으로 설치되어있었어서 발생한 문제였다.

 

GPT선생님이 알려준 

pip install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html

코드로 PYTORCH GPU버전을 설치하니 아주 잘 동작하였다

반응형