Skip to content

Fix GatherBlockQuantized default zero point on CUDA - #31693

Merged
Tianlei Wu (tianleiwu) merged 3 commits into
mainfrom
copilot/fix-default-zero-point-issue
Aug 10, 2026
Merged

Tianlei Wu (tianleiwu) merged 3 commits into
mainfrom
copilot/fix-default-zero-point-issue

Conversation

Copilot AI commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Default omitted packed uint8 zero points to 2^(bits - 1) in the CUDA kernel.
  • Add a Q4_0 regression test verifying (10 - 8) * scale for 0xAA weights.

Motivation and Context

CUDA previously treated omitted zero_points as zero, while CPU used the documented midpoint default. This caused execution-provider-dependent output and corrupted quantized embedding rows.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: justinchuby <11205048+justinchuby@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix GatherBlockQuantized default zero point discrepancy between CPU and CUDA Fix GatherBlockQuantized default zero point on CUDA Aug 6, 2026

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@justinchuby
Justin Chu (justinchuby) marked this pull request as ready for review August 6, 2026 18:22
@justinchuby
Justin Chu (justinchuby) enabled auto-merge (squash) August 6, 2026 18:22
auto-merge was automatically disabled August 7, 2026 02:26

Pull request was closed

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@tianleiwu
Tianlei Wu (tianleiwu) enabled auto-merge (squash) August 7, 2026 02:26
@tianleiwu

Copy link
Copy Markdown
Contributor

Copilot, please fix CI pipeline failures. Some failed test cases need update expected results.

Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>

Copilot AI commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Copilot, please fix CI pipeline failures. Some failed test cases need update expected results.

Updated the 4-bit and 8-bit CUDA expected outputs to account for the default midpoint zero point in c72b425. Verified formatting and decoded-value calculations.

@tianleiwu
Tianlei Wu (tianleiwu) merged commit ab7d460 into main Aug 10, 2026
83 of 86 checks passed
@tianleiwu
Tianlei Wu (tianleiwu) deleted the copilot/fix-default-zero-point-issue branch August 10, 2026 16:11
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.

GatherBlockQuantized default zero_point differs between CPU and CUDA

5 participants