Setting, Error/Linux

Pytorch 실행 에러 cuDNN version incompatibility

Juheon Kwak 2024. 3. 26. 02:22

Pytorch 실행하다가 갑자기 하루 아침에 뜬 cuDNN 관련 에러

 

- Error Log

RuntimeError: cuDNN version incompatibility: PyTorch was compiled  against (8, 9, 2) but found runtime version (8, 7, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN. Looks like your LD_LIBRARY_PATH contains incompatible version of cudnn. Please either remove it from the path or install cudnn (8, 9, 2)

-> 환경변수인 LD_LIBRARY_PATH의 pytorch 버전과 현재 돌아가는 gpu의 cuDNN 버전이 맞지 않다는 오류.

 

▶ 해결 방법 

1. terminal(혹은 커널)에서 LD_LIBRARY_PATH 해제

$ unset LD_LIBRARY_PATH

 

2. py 파일 및 코드 재실행