~/lightning

Lightning Talk: Accelerating PyTorch Models With Torch.compile's C++ Wrapper Mode

Lightningat PyTorch Conference Europe 2026 · 2026-04-07..04-08· [machine-learning]
name:Bin Bao
links:none on file
slides:none on file

torch.compile replaces the Python wrapper with C++ wrapper mode to cut CPU orchestration overhead, claiming up to 39% speedup over default torch.compile on OSS Huggingface benchmarks while also showing smaller gains on TorchBench and detectible platform-wide improvements (H100, B200, MI300). Kernel generation still uses Triton so the implementation offers lazy Triton compilation (runtime-triggered) or eager compile options, requires a host C++ compiler, and increases compile time ~1.3–2x versus the Python wrapper.

AI-written summary · about

  1. 0:00Accelerating PyTorch with C++ wrapper
  2. 1:47Model bottlenecks in PyTorch
  3. 2:52Torch.compile C++ wrapper basics
  4. 5:20C++ wrapper mode challenges
  5. 8:10Custom ops and CUDA graphs with C++
  6. 10:17Performance results and benchmarks
  7. 12:45Trade-offs and compilation time
  8. 13:27C++ wrapper mode availability
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.