$ the-wire · showcase
Inductor goes module-level by default, then gets reverted around
By RepoJournal · Filed · About PyTorch · Composed from the cited sources · methodology
Inductor's default Python wrapper now emits Triton kernels as module-level defs instead of async_compile.triton strings, but two sibling refactors in the same series were reverted for breaking an internal build.
[module-level kernels] inductor: define Triton kernels at module level by default (#200502) pytorch/pytorch
PythonWrapperCodegen.defines_triton_kernels_as_code() returned False at the parent commit, so every Triton kernel was bound through an async_compile.triton('''<source>''') string and module-level defs were only reachable in tests that patched the method. The readable, editable wrapper is now the default path.
Revert "[module-level kernels] inductor: emit only the preamble imports and bindings the wrapper uses (#200518)" pytorch/pytorch
The mergebot reverted the change that emitted only the preamble imports and bindings the wrapper actually uses, on behalf of @atalman, citing a broken internal build. The companion change to write the preamble one line at a time went with it, so treat generated-wrapper output as in flux this week.
Revert "[module-level kernels] inductor: write the python wrapper's preamble one line at a time (#200517)" pytorch/pytorch
Reverted alongside the preamble change for the same internal build failure, so the wrapper still writes its preamble the previous way. Anyone reading inductor codegen diffs against main should rebase past both reverts before drawing conclusions about the wrapper's shape.
[compile][perf] Compile Muse Spark's SwiGLU and DeepSeek-V4's RoPE by default (#5561) pytorch/torchtitan
DeepSeek-V4's RoPE and Muse Spark's routed-expert SwiGLU were calling an existing compiled region without listing it, so both ran eager. Listing them makes DeepSeek-V4's RoPE kernels 40% faster bitwise and 2 layers 1.1% faster in training, and Muse Spark's SwiGLU 4.0 to 5.9% faster on a 4-layer unit.
Support negative indices and omitted unit dimensions in index_put_ pytorch/executorch
Transformers Mistral sliding-window decode failed once reinplace rewrote cache updates to aten::index_put_, because the portable kernel rejected index -1 and demanded values of shape [1, 2, 1, 8] where the exported graph supplies [2, 1, 8]. The kernel now accepts indices in [-size, size) and omitted leading unit dimensions.
[executorch][ci] Split unittest-cuda into kernel and system shards pytorch/executorch
Also worth noting: unittest-cuda has hit its 90 minute timeout on every main run since SDPA autotune tests grew about 6.5 min slower (test_triton_sdpa.py from 10.4 to 16.9 min), and the job is now split into kernel and system shards; TorchTPU-facing error text no longer lists xla as a valid device type; and the Arm backend dropped examples/arm/aot_arm_compiler.py in favor of backends.arm.script...
Action items
- → Replace examples/arm/aot_arm_compiler.py with backends.arm.scripts.aot_arm_compiler in Arm export scripts pytorch/executorch [plan]