Add TRITON_PROFILE_COMPILE knob for compilation time profiling#905
Open
Add TRITON_PROFILE_COMPILE knob for compilation time profiling#905
Conversation
6bca499 to
68c8e8a
Compare
When enabled, prints per-stage compilation time breakdowns to stderr
for each kernel compilation (ir_init, ttir, ttgir, llir, ptx, cubin,
store) along with config info (block sizes, warps, stages), and
benchmark timing summaries with compile vs bench breakdown after
autotuning completes. Default off.
Test plan:
- Unit tests: `pytest python/test/unit/runtime/test_compilation_listener.py`
- test_profile_compile: verifies stage breakdowns on cache miss,
"cache hit" label on cache hit
- test_profile_compile_off_by_default: verifies no output when knob
is off
- Perf test: `TRITON_PROFILE_COMPILE=1 CUDA_VISIBLE_DEVICES=<gpu> \
third_party/tlx/denoise.sh python \
third_party/tlx/tutorials/testing/test_blackwell_gemm_perf.py \
--version ws`
Authored with Claude.
68c8e8a to
85be855
Compare
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.
When enabled, prints per-stage compilation time breakdowns to stderr for each kernel compilation (ir_init, ttir, ttgir, llir, ptx, cubin, store), and benchmark timing summaries after autotuning completes. Default off.
Test plan:
TRITON_ALWAYS_COMPILE=1 TRITON_PROFILE_COMPILE=1 CUDA_VISIBLE_DEVICES=7 third_party/tlx/denoise.sh python third_party/tlx/tutorials/testing/test_blackwell_gemm_perf.py --version wsLOG: https://www.internalfb.com/intern/paste/P2186293125/
Authored with Claude.