Skip to content

Added mxfp4 benchmarking script#865

Open
suryajasper wants to merge 9 commits intoiree-org:mainfrom
suryajasper:benchmark-mxfp4
Open

Added mxfp4 benchmarking script#865
suryajasper wants to merge 9 commits intoiree-org:mainfrom
suryajasper:benchmark-mxfp4

Conversation

@suryajasper
Copy link

@suryajasper suryajasper commented Feb 10, 2026

Standalone MXFP4 Wave benchmarking script

Features

  • Validates kernels against torch reference & benchmarks using rocprof
  • Uses tagged mxfp4 template with manual double buffering schedule (template can be modified or swapped using get_mxfp4_gemm_wave)
  • Accepts input csv containing shapes and macrotile sizes
  • Tracks compilation, validation, & benchmarking failures
  • Produces result csv containing runtime (microseconds), TFLOPs, and failed kernels

Changes

  • Introduced mxfp4 benchmarking script
  • Refactored rocprof profiling & parsing into utils module, shared between mxfp4 & asm benchmarks

Usage

Without thread trace (default)

python -u wave_lang/kernel/wave/perf/benchmark_mxfp4.py --shapes wave_lang/kernel/wave/perf/mxfp4_shapes_macrotiles.csv -o results.csv

With thread trace (requires rocprof-trace-decoder)

ATT_LIBRARY_PATH=/path/to/rocprof-trace-decoder/rocm/lib python -u wave_lang/kernel/wave/perf/benchmark_mxfp4.py --shapes wave_lang/kernel/wave/perf/mxfp4_shapes_macrotiles.csv --dump-dir ./mxfp4_dump -o results.csv

@suryajasper suryajasper force-pushed the benchmark-mxfp4 branch 5 times, most recently from f52315c to c62d5af Compare February 11, 2026 02:38
@harsh-nod
Copy link
Collaborator

Could you also add a commit message describing exactly what this PR is providing and some instructions on how to use?

Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
- Dropped --shape / --tiles; runs only via --shapes CSV
- Added shape/macrotile validation on CSV load
- Added ok column to result CSV
- Use timestamped dump subdir per run to avoid overwriting
- Refactored APIs to use (shape, macrotiles) tuples
- Improved error handling: raise instead of silent catch; add BenchmarkError
- Separate reporting for compile vs validation vs benchmark failures

Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
… source of truth between ASM bench & mxfp4 bench

Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
Signed-off-by: Surya Jasper <45545431+suryajasper@users.noreply.github.com>
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