Skip to content

Optimize CPU uint8 GatherBlockQuantized dequantization - #32621

Merged
kunal-vaishnavi merged 2 commits into
mainfrom
copilot/recover-revert-gatherblockquantized-edits
Sep 17, 2026
Merged

kunal-vaishnavi merged 2 commits into
mainfrom
copilot/recover-revert-gatherblockquantized-edits

Conversation

Copilot AI commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • Restore the missing GatherBlockQuantized optimization from Optimize CPU uint8 GatherBlockQuantized dequantization #32598.
  • Batch-unpack packed 2-, 4-, and 8-bit uint8 values.
  • Group values sharing scale and zero-point parameters.
  • Use MLAS for vectorized float dequantization and FP16 conversion.
  • Preserve the existing Int4x2 and UInt4x2 paths.

Motivation and Context

The stacked-PR automation moved #32598’s head to its merged base, making the PR empty without incorporating its optimization into main. This replacement reapplies the recoverable one-file diff from its last complete head.

Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
@azure-pipelines

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

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.

🟡 Changes recommended

The new 256-element batch boundary lacks regression coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Optimizes CPU dequantization for packed uint8 GatherBlockQuantized data.

Changes:

  • Batch-unpacks 2-, 4-, and 8-bit values.
  • Uses MLAS for vectorized dequantization and FP16 conversion.
  • Preserves existing 4-bit wrapper paths.
File summaries
File Description
onnxruntime/contrib_ops/cpu/quantization/gather_block_quantized.cc Implements batched MLAS dequantization for uint8.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread onnxruntime/contrib_ops/cpu/quantization/gather_block_quantized.cc
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>

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.

🟢 Approval recommended

The optimization preserves existing paths and includes focused boundary coverage.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

This was referenced Oct 14, 2026
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.

4 participants