Repository navigation
Probe the optional launch ABI before constructing the JIT function (#65 on current main) - #74
Merged
Merged
Conversation
`FastJITFunction3x` constructed the JIT function before importing the optional `triton.knobs`. Where a Triton 3.x lacks it, that import fails and `triton_jit` constructs the stock fallback, parsing each kernel's source twice. The imports now come first, so the fallback constructs one JIT function. From #65, on current main, without its tests. MEASURED, `import pyjuice` on Triton 3.7, the optional import blocked to stand in for a release without it: 248 `triton.jit` calls, 79 ms -> 170, 48 ms, of about 2.7 s. With it available nothing changes: 170 calls, 48 ms, the same fast wrapper. `tests/misc/kernel_launcher_test.py` passes; the full suite runs once the pending PRs are merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #65 by hxu129: the same source change, on current
main, under hxu129's authorship. The tests from #65 are left out on purpose.FastJITFunction3xconstructed the JIT function before importing the optionaltriton.knobs. Where a Triton 3.x lacks it, that import fails andtriton_jitconstructs the stock fallback, parsing each kernel's source twice. The imports now come first, so the fallback constructs one JIT function.MEASURED on
import pyjuice, Triton 3.7, about 2.7 s in every arm:triton.jitcallsknobsavailable, before and afterknobsblocked, beforeknobsblocked, afterWith
knobsavailable the fast wrapper is still chosen. Blocking the import stands in for a release without it; this was not run on a real Triton 3.0.0 here, though #65 reports doing so.tests/misc/kernel_launcher_test.pypasses with the change. Not run: the full suite, which will run once the pending PRs are merged.