Skip to content

Microbench: measure mem_latency_us for gpu arch JSON - #964

Draft
ajassani wants to merge 2 commits into
mainfrom
ajassani/microbench-mem-latency
Draft

ajassani wants to merge 2 commits into
mainfrom
ajassani/microbench-mem-latency

Conversation

@ajassani

Copy link
Copy Markdown
Collaborator

Summary

  • Add HBM access latency measurement to TraceLens.PerfModel.benchmarking.microbench using a Triton dependent-load pointer chase (64 MiB index table).
  • Emit mem_latency_us in measured gpu arch JSON output; add --latency-only and --skip-latency flags.
  • Lazy-load fp4fp6_helpers so latency-only runs work on gfx90a/MI210 without MXFP4 Triton JIT abort.

Validation

  • MI210 on remote GPU lab: 0.32 µs per dependent load (--latency-only --warmup 5 --rep 30).

Test plan

  • pytest tests/test_perfmodel_benchmarking.py -k measured_arch
  • python -m TraceLens.PerfModel.benchmarking.microbench --device 0 --latency-only --warmup 5 --rep 20
  • Full microbench run populates mem_latency_us alongside mem_bw_gbps and MAF keys

Pairs with roofline PR that consumes mem_latency_us for LATENCY_BOUND classification (separate PR).

ajassani and others added 2 commits August 24, 2026 17:29
Extend gpu arch microbenchmarking to emit mem_latency_us using a Triton
dependent-load pointer chase over a 64 MiB index table. Adds --latency-only
for fast smoke tests and wires the field into the arch JSON output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid importing fp4fp6_helpers at module load; Triton dot_scaled JIT can
abort on gfx90a when only mem_latency_us is needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 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