Skip to content

Extend the experimental gemm_quantized benchmark in benchmarks/matmul.py to support static per-channel scaling and optional output dequantization on top of the dynamic per-channel baseline. - #162

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1018026152
Nov 17, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1018026152

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Extend the experimental gemm_quantized benchmark in benchmarks/matmul.py to support static per-channel scaling and optional output dequantization on top of the dynamic per-channel baseline.

  • Add QuantScaling ("dynamic" and "static", using fixed clip bound 0.5 * Q_MAX and compile-time scale 0.5) to QuantizedGemmParams.
  • Add dequantize (bool, default False) to multiply the dot_general accumulator by the row and column dequantization scales (sf_a * sf_b) before casting to out_dtype.
  • Include scaling and dequantize in QuantizedGemmBenchmark.REPORT_SCHEMA and get_run_identifier().

@google-cla

google-cla Bot commented Nov 11, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_1018026152 branch 3 times, most recently from fd2e7fb to 0faa73c Compare November 16, 2026 06:43
@copybara-service copybara-service Bot changed the title Extend the experimental gemm_quantized benchmark in benchmarks/matmul.py to support static row-wise scaling and optional output dequantization on top of the dynamic row-wise baseline. Extend the experimental gemm_quantized benchmark in benchmarks/matmul.py to support static per-channel scaling and optional output dequantization on top of the dynamic per-channel baseline. Nov 16, 2026
@copybara-service
copybara-service Bot force-pushed the test_1018026152 branch 2 times, most recently from 33e8375 to 718be28 Compare November 17, 2026 05:18
…mul.py` to support static per-channel scaling and optional output dequantization on top of the dynamic per-channel baseline.

*   Add `QuantScaling` (`"dynamic"` and `"static"`, using fixed clip bound `0.5 * Q_MAX` and compile-time scale `0.5`) to `QuantizedGemmParams`.
*   Add `dequantize` (`bool`, default `False`) to multiply the `dot_general` accumulator by the row and column dequantization scales (`sf_a * sf_b`) before casting to `out_dtype`.
*   Include `scaling` and `dequantize` in `QuantizedGemmBenchmark.REPORT_SCHEMA` and `get_run_identifier()`.

PiperOrigin-RevId: 1023375939
@copybara-service
copybara-service Bot merged commit 7140a71 into main Nov 17, 2026
1 of 2 checks passed
@copybara-service
copybara-service Bot deleted the test_1018026152 branch November 17, 2026 05:22
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.

0 participants