Skip to content

Fix MatMulNBits benchmark model IR compatibility - #33577

Open
Srijan Keshri (arcusbuilds) wants to merge 1 commit into
microsoft:mainfrom
arcusbuilds:fix/matmulnbits-profile-model-ir
Open

Srijan Keshri (arcusbuilds) wants to merge 1 commit into
microsoft:mainfrom
arcusbuilds:fix/matmulnbits-profile-model-ir

Conversation

@arcusbuilds

Copy link
Copy Markdown

Description

Set the MatMulNBits profiling model to IR8, matching opset17, and add a regression test.

Validation: the test fails before the fix and passes afterward. The model loads with ONNX 1.19.1 and ORT 1.23.2. Ruff lint and format checks pass.

Motivation and Context

ONNX 1.19.1 defaults to IR12, which ORT 1.23.2 rejects. The benchmark does not need that newer IR.

Fixes #33576

Copilot AI balanced review requested due to automatic review settings October 24, 2026 19:49
@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.

🟢 Approval recommended

The focused compatibility fix preserves the graph and opset, adds regression coverage, and has no identified blocking issues.

No open issues 🎉

What changed in this PR

This PR fixes #33576 by pinning the MatMulNBits benchmark model to IR8, avoiding the newer default IR that ORT 1.23.2 rejects.

Changes:

  • Explicitly sets IR8 while preserving the existing opset17 import.
  • Adds a regression test asserting the serialized IR version and validating the model with the ONNX checker.
File Description
onnxruntime/​test/​python/​transformers/​test_profile_matmul_nbits.py Adds IR-version and model-validity regression coverage.
onnxruntime/​test/​python/​transformers/​profile_matmul_nbits.py Pins the generated benchmark model to IR8.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

MatMulNBits benchmark generates IR12 models rejected by ORT 1.23.2

2 participants