Skip to content

remove per kernel fp8 triton quantized benchmarks - #4166

Merged
iamzainhuda merged 4 commits into
mainfrom
fp8-remove-bench
Mar 26, 2026
Merged

iamzainhuda merged 4 commits into
mainfrom
fp8-remove-bench

Conversation

@iamzainhuda

Copy link
Copy Markdown
Contributor

Summary

This removes the redundant bench_triton_fp8_* quant benchmark scripts under benchmarks/prototype/blockwise_fp8_training and consolidates their correctness coverage into benchmark_quant_kernel_bandwidth.py.

The consolidated benchmark now has an optional --check-correctness mode that compares each Triton quant kernel against the corresponding Torch reference implementation, including layout/stride checks where applicable. The weight-kernel references were adjusted to match Triton’s column-major outputs and scales, which was required for weight_quant_rhs and weight_quant_transposed_rhs.

Testing

  • python -m py_compile benchmarks/prototype/blockwise_fp8_training/benchmark_quant_kernel_bandwidth.py
  • python -m benchmarks.prototype.blockwise_fp8_training.benchmark_quant_kernel_bandwidth --help
  • python -m benchmarks.prototype.blockwise_fp8_training.benchmark_quant_kernel_bandwidth --check-correctness on H100, completed successfully with no correctness failures.

@pytorch-bot

pytorch-bot Bot commented Mar 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/4166

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 9717b75 with merge base bca91b0 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 24, 2026
@iamzainhuda iamzainhuda added module: training quantize_ api training flow and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Mar 24, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 24, 2026
Comment thread benchmarks/prototype/blockwise_fp8_training/benchmark_quant_kernel_bandwidth.py Outdated
m_values=args.m_values,
k=args.k,
block_size=args.block_size,
bandwidth_spec=bandwidth_spec,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also update this script to only measure against peak achievable bandwidth as defined in the gpu_spec in roofline_utils.py we import (not measure against the "advertised max theoretical bandwidth" number)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now script reports both, do you want me to remove the max theoretical bandwidth numbers altogether?
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's just keep vs_achievable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, added print to make it clear to user as well what achievable % is used

@iamzainhuda
iamzainhuda merged commit 2c4ecb0 into main Mar 26, 2026
23 checks passed
Priyjain-amd pushed a commit to Priyjain-amd/ao that referenced this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: training quantize_ api training flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants