PyTorch 2.14에서 Python 3.15로 torch.compile을 호출하면 RuntimeError가 납니다 | DAKER 커뮤니티
한 줄 요약
PyTorch 2.14는 Python 3.15·3.15t 휠을 제공하지만, 이 환경에서 torch.compile을 호출하면 조용히 느려지는 것이 아니라 RuntimeError가 납니다. compile이 필요한 작업은 Python 3.14 이하를 쓰십시오.
근거는 공식 릴리스 블로그입니다. PyTorch 2.14 Release Blog(2026-09-02)에는 「Python 3.15 support in 2.14 is eager-only. Calling torch.compile under Python 3.15 raises a RuntimeError rather than falling back silently」라고 적혀 있습니다. GA 안내는 dev-discuss 게시에도 있습니다.
재현 조건
- 인터프리터가 Python 3.15 또는 free-threaded 3.15t입니다.
- PyTorch 2.14를 설치합니다. 공식 블로그에 따르면 3.15·3.15t 휠은 PyPI가 아니라
https://download.pytorch.org/whl/...인덱스에서만 받습니다. - 모델에
torch.compile(...)을 호출합니다.
이 조건에서 compile은 자동으로 eager로 떨어지지 않고 RuntimeError를 냅니다. 성능이 조금 떨어진 것처럼 보이는 함정이 아니라, 바로 실패합니다.
해결·실험 체크
torch.compile이 필요한 학습·추론 파이프라인은 Python 3.14 이하를 유지합니다.- 3.15에서 eager API만 검증하는 실험과, compile 경로 실험을 분리합니다.
- 설치 명령은 공식 Getting Started와 블로그의 CUDA·ROCm·XPU 인덱스를 따릅니다. 예:
pip3 install torch --index-url https://download.pytorch.org/whl/cpu. - Dynamo의 3.15 지원은 공식 블로그 기준 진행 중이며, 이슈 트래킹은
pytorch/pytorch#184352입니다. 완료 전에는 compile을 전제로 한 벤치를 3.15에 두지 마십시오.
관련 DAKER 학습
텐서·디바이스·학습 루프 기초는 DAKER 공개 학습 트랙을 참고하십시오.
출처: pytorch.org/blog/pytorch-2-14-release-blog, Getting Started.