Skip to content

Feat/triton false positive handling - #1067

Merged
tsrikris merged 1 commit into
staging_agentfrom
feat/triton_false_positive_handling
Sep 29, 2026
Merged

tsrikris merged 1 commit into
staging_agentfrom
feat/triton_false_positive_handling

Conversation

@tsrikris

Copy link
Copy Markdown
Contributor

Summary

  • resolve_triton_source now marks a .py launcher patchable only when the file defines at least one @triton.jit/@gluon.jit kernel. A native or precompiled kernel dispatched through a
    triton-named .py wrapper (zero jit defs) returns unresolved, and resolve_kernel_source falls back to native classification instead of routing it as editable Triton.
  • A non-.py launcher sentinel (e.g. "AITER (vendor)") is no longer misclassified as a generated-Triton source. It drives the symbol-name search, so a genuine @triton.jit kernel whose
    trace records only a vendor sentinel launcher resolves to its real source.
  • The symbol-index text pre-filter now admits gluon-only files.

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 .py
launcher 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 .py with no jit def -> non-patchable/native; real @triton.jit/@gluon.jit launcher stays patchable with a pinned
    line; non-.py sentinel launcher -> symbol-index resolution; name-only gluon fallback.
  • End-to-end against real traces (5 profiling artifacts): native/precompiled dispatchers through .py wrappers de-route correctly; vendor-fused Triton kernels resolve to their editable
    source; genuinr Triton/gluon routing unchanged.

@tsrikris
tsrikris changed the base branch from main to staging_agent September 29, 2026 23:55
@tsrikris
tsrikris merged commit b79f906 into staging_agent Sep 29, 2026
4 of 5 checks passed
@tsrikris
tsrikris deleted the feat/triton_false_positive_handling branch September 29, 2026 23:55
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
TraceLens/TraceUtils/kernel_source/triton_pin.py 89.47% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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