Skip to content

Support exact INT8 matrix multiplication via INT4 building blocks in QWIX. - #371

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_981365884
Sep 25, 2026
Merged

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

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Support exact INT8 matrix multiplication via INT4 building blocks in QWIX.

Enables exact signed INT8 matrix multiplication emulated through native INT4 sub-byte passes:

  • Support exact signed INT8 multi-pass modes:
    • four_pass_int4: Full cross product via 4 native INT4 passes (Ah Bh + Ah Bl + Al Bh + Al Bl).
  • INT8 inputs are decomposed into high and low 4-bit nibbles with algebraic offset adjustments.
  • Add unit tests verifying exact numerical equivalence (0 max diff) to signed INT8 GEMM across random and boundary inputs.

INT8 Multi-Pass SQNR Benchmark Table (512x512, Channel-wise / Tensor Scaling)

Strategy GEMMs Compute DType Execution Target SQNR (dB) Rel Error (%) Equivalence vs INT8
1-Pass INT8 Baseline 1 int32 / float32 CPU Reference 38.29 dB 1.22% Exact INT8 baseline
Signed INT8 via INT4 Emulated Int 4 float8_e4m3fn Physical TPU (FP8 Path) 37.61 dB 1.32% Exact product on TPU FP8 MXU

@copybara-service
copybara-service Bot force-pushed the test_981365884 branch 4 times, most recently from 98d7abf to a747767 Compare September 17, 2026 17:13
@copybara-service copybara-service Bot changed the title Support bit-exact INT8 matrix multiplication via INT4 building blocks in QWIX Support INT8 matrix multiplication via INT4 building blocks in QWIX Sep 17, 2026
@copybara-service
copybara-service Bot force-pushed the test_981365884 branch 4 times, most recently from 8e3c773 to 3b64d14 Compare September 22, 2026 06:03
@copybara-service copybara-service Bot changed the title Support INT8 matrix multiplication via INT4 building blocks in QWIX Support exact INT8 matrix multiplication via INT4 building blocks in QWIX. Sep 22, 2026
@copybara-service
copybara-service Bot force-pushed the test_981365884 branch 16 times, most recently from 1b6c240 to ebcb408 Compare September 25, 2026 19:02
…QWIX.

Enables exact signed INT8 matrix multiplication emulated through native INT4 sub-byte passes:

- Support exact signed INT8 multi-pass modes:
  - four_pass_int4: Full cross product via 4 native INT4 passes (Ah Bh + Ah Bl + Al Bh + Al Bl).
- INT8 inputs are decomposed into high and low 4-bit nibbles with algebraic offset adjustments.
- Add unit tests verifying exact numerical equivalence (0 max diff) to signed INT8 GEMM across random and boundary inputs.

### INT8 Multi-Pass SQNR Benchmark Table (512x512, Channel-wise / Tensor Scaling)

| Strategy | GEMMs | Compute DType | Execution Target | SQNR (dB) | Rel Error (%) | Equivalence vs INT8 |
| :---| :---: | :---| :---| :---| :---: | :---|
| 1-Pass INT8 Baseline | 1 | int32 / float32 | CPU Reference | 38.29 dB | 1.22% | Exact INT8 baseline |
| Signed INT8 via INT4 Emulated Int | 4 | float8_e4m3fn | Physical TPU (FP8 Path) | 37.61 dB | 1.32% | Exact product on TPU FP8 MXU |

PiperOrigin-RevId: 988453232
@copybara-service
copybara-service Bot merged commit 5e57079 into main Sep 25, 2026
3 of 6 checks passed
@copybara-service
copybara-service Bot deleted the test_981365884 branch September 25, 2026 20:13
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