가이드 연계 퀴즈 · 하드 레벨

torch.compile 및 PyTorch 2 그래프 컴파일 퀴즈

torch.compile 캡처 및 백엔드 역할, 그래프 나누기, 컴파일 오버헤드, 모양 전문화 및 공정한 성능 확인을 이해하세요.

관련 가이드 경로토치 컴파일 Pytorch 2
질문 1 의 8

What does torch.compile attempt to do with compatible PyTorch computation?

모든 질문 미리보기8 질문

퀴즈를 풀면 정답과 설명이 나타납니다.

  1. What does torch.compile attempt to do with compatible PyTorch computation?
    • Rewrite the model’s training labels
    • Guarantee the same speedup for every workload
    • Capture and compile compatible tensor operations for optimized execution
    • Replace the model’s objective function
  2. Which component commonly captures Python frames in PyTorch 2 compilation?
    • TorchInductor
    • TorchDynamo
    • 토치스크립트
    • 오토그라드
  3. What does TorchInductor commonly provide?
    • Python frame and graph capture
    • Optimizer state management
    • Data batching and shuffling
    • A compiler backend that generates optimized code
  4. Why can the first compiled call be slower than eager execution?
    • Tracing and compilation add work to the first call
    • The first call always uses a larger training batch
    • Graph capture removes GPU operations
    • The first output is not computed
  5. With the default partial-graph behavior, what can happen when part of execution cannot be captured?
    • The entire model necessarily raises an error
    • An uncaptured region may run eagerly before capture resumes
    • The unsupported operation is omitted from the output
    • The optimizer changes the learning rate automatically
  6. What can happen when input shapes change?
    • A guard failure may trigger another specialized compilation
    • All shapes are padded to one size automatically
    • The compiled model ignores future input shapes
    • A new dataset is created for each shape
  7. How should a team assess a claimed compile speedup?
    • Time only the first call and call it steady state
    • Ignore data loading and synchronization
    • Use different models and batches in each measurement
    • Compare warmed-up end-to-end performance on representative inputs
  8. What should be checked after enabling compilation for training?
    • Output and gradient agreement with eager execution
    • The compile log contains no warnings
    • Warm throughput is higher than eager mode
    • Peak memory is lower than eager mode