Skip to content

Probe optional fast-launch ABI before constructing Triton JIT functions - #65

Closed
hxu129 wants to merge 4 commits into
Tractables:mainfrom
hxu129:codex/pyjuice-launch-abi-upstream
Closed

hxu129 wants to merge 4 commits into
Tractables:mainfrom
hxu129:codex/pyjuice-launch-abi-upstream

Conversation

@hxu129

@hxu129 hxu129 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

With fast launch enabled on Triton 3.0.0, FastJITFunction3x constructs a JIT function before importing the optional triton.knobs API. That import fails on this release, and triton_jit constructs the stock fallback, parsing the same kernel source twice. Probe the optional launch ABI first so the fallback constructs only one JIT function.

This update merges current upstream main while preserving the original PR history. The constructor conflict is resolved by retaining main's new self.binders cache and moving only the optional driver/knobs imports before triton.jit(fn). The newer argument binding and launch logic are retained; kernel arithmetic is unchanged. The original seven regression cases are preserved byte for byte.

Validation on Python 3.10.14, PyTorch 2.4.0+cu121, Triton 3.0.0 and an RTX 4090:

  • The updated source was built through sdist → wheel and installed into a fresh virtual environment. Installed-package origins and payload hashes were checked.
  • The original test module produced 7 passes, 0 failures, 0 errors and 0 skips, including four real CUDA cases covering FP32/FP16, aligned/misaligned views, partial tiles and repeated shapes. The installed payload remained unchanged.
  • The missing-knobs regression was also run against the normally installed, unmodified main wheel with CUDA hidden. It failed as expected because triton.jit was called twice. The baseline installation remained unchanged.

For source-checkout reproduction, the focused command is:

PYTHONPATH=src python -m pytest -q tests/misc/kernel_launcher_optional_abi_test.py

The Triton 3.5.0 available-ABI construction branch is mocked; it is not a compatibility qualification for that release or other newer Triton versions. No application-level speedup is claimed.

AI assistance was used for implementation and test development.

@hxu129
hxu129 marked this pull request as ready for review October 20, 2026 21:37
Preserve the binder cache while probing the optional launch ABI before JIT construction.
Keep the original optional-ABI regression tests unchanged.
liuanji added a commit that referenced this pull request Nov 4, 2026
Probe the optional launch ABI before constructing the JIT function (#65 on current main)
@liuanji

liuanji commented Nov 4, 2026

Copy link
Copy Markdown
Member

Resolved by #74, now on main: it carries this source change, under your authorship, on current main. The tests were left out on purpose. Thank you.

@liuanji liuanji closed this Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants