Feat/triton false positive handling - #1067
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
resolve_triton_sourcenow marks a.pylauncher patchable only when the file defines at least one@triton.jit/@gluon.jitkernel. A native or precompiled kernel dispatched through atriton-named.pywrapper (zero jit defs) returnsunresolved, andresolve_kernel_sourcefalls back to native classification instead of routing it as editable Triton..pylauncher sentinel (e.g."AITER (vendor)") is no longer misclassified as a generated-Triton source. It drives the symbol-name search, so a genuine@triton.jitkernel whosetrace records only a vendor sentinel launcher resolves to its real source.
Why
Consumers forward the trace's kernel launcher straight through and rely on this resolver as the single oracle for the native-vs-Triton decision. The previous behavior marked any editable
.pylauncher patchable without confirming it defines the kernel, mislabeling native/precompiled kernels as patchable; and for vendor-fused ops whose trace records only a sentinel launcher, it
dropped genuinely editable Triton kernels to non-patchable.
Test plan
tests/test_kernel_source_triton.py(22 passed): native dispatcher.pywith no jit def -> non-patchable/native; real@triton.jit/@gluon.jitlauncher stays patchable with a pinnedline; non-
.pysentinel launcher -> symbol-index resolution; name-only gluon fallback..pywrappers de-route correctly; vendor-fused Triton kernels resolve to their editablesource; genuinr Triton/gluon routing unchanged.