Repository navigation
Add the experimental gemm_quantized microbenchmark (QuantizedGemmBenchmark and QuantizedGemmParams) in benchmarks/matmul.py to measure end-to-end matrix multiplication with on-the-fly dynamic per-channel quantization of both A[M, K] and B[K, N] operands. - #159
Merged
Merged
Conversation
|
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
Bot
force-pushed
the
test_1013640925
branch
3 times, most recently
from
November 16, 2026 06:12
d975aa8 to
5604b3d
Compare
gemm_quantized microbenchmark (QuantizedGemmBenchmark and QuantizedGemmParams) in benchmarks/matmul.py to measure end-to-end matrix multiplication with on-the-fly dynamic row-wise quantization of both A[M, K] and B[K, N] operands.gemm_quantized microbenchmark (QuantizedGemmBenchmark and QuantizedGemmParams) in benchmarks/matmul.py to measure end-to-end matrix multiplication with on-the-fly dynamic per-channel quantization of both A[M, K] and B[K, N] operands.
copybara-service
Bot
force-pushed
the
test_1013640925
branch
from
November 16, 2026 06:34
5604b3d to
30959eb
Compare
…enchmark` and `QuantizedGemmParams`) in `benchmarks/matmul.py` to measure end-to-end matrix multiplication with on-the-fly dynamic per-channel quantization of both `A[M, K]` and `B[K, N]` operands. * Subclasses `BaseGemmBenchmark` in `benchmarks/matmul.py` (sharing `_replicated_normal`, compute roofline efficiency, XProf fallback matching, and `2 * M * N * K` FLOP throughput calculation) and extracts `MatmulShapeParams` for shared `(M, K, N)` shape, dtype, and seed fields. * Quantizes `bfloat16`/`float32` operands dynamically per row/column (`inv_scale = Q_MAX / amax`, `q = clip(x * inv_scale, -Q_MAX, Q_MAX)`) to `quant_dtype` (`float8_e4m3fn`, `float8_e5m2`, `int8`) inside the timed step before `jax.lax.dot_general`. * Counts 1-pass algorithmic HBM bytes (reading `A` and `B` once plus writing the output) and uses `quant_dtype` for the hardware MXU peak TFLOPS ceiling. PiperOrigin-RevId: 1022517434
copybara-service
Bot
force-pushed
the
test_1013640925
branch
from
November 16, 2026 06:35
30959eb to
79da05c
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.
Add the experimental
gemm_quantizedmicrobenchmark (QuantizedGemmBenchmarkandQuantizedGemmParams) inbenchmarks/matmul.pyto measure end-to-end matrix multiplication with on-the-fly dynamic per-channel quantization of bothA[M, K]andB[K, N]operands.BaseGemmBenchmarkinbenchmarks/matmul.py(sharing_replicated_normal, compute roofline efficiency, XProf fallback matching, and2 * M * N * KFLOP throughput calculation) and extractsMatmulShapeParamsfor shared(M, K, N)shape, dtype, and seed fields.bfloat16/float32operands dynamically per row/column (inv_scale = Q_MAX / amax,q = clip(x * inv_scale, -Q_MAX, Q_MAX)) toquant_dtype(float8_e4m3fn,float8_e5m2,int8) inside the timed step beforejax.lax.dot_general.AandBonce plus writing the output) and usesquant_dtypefor the hardware MXU peak TFLOPS ceiling.