Skip to content

[AMD] Require and test amd-quark 0.13 for QuarkQuantization - #2793

Open
Thiago Crepaldi (thiagocrepaldi) wants to merge 2 commits into
microsoft:mainfrom
thiagocrepaldi:quark-0.13
Open

Thiago Crepaldi (thiagocrepaldi) wants to merge 2 commits into
microsoft:mainfrom
thiagocrepaldi:quark-0.13

Conversation

@thiagocrepaldi

Copy link
Copy Markdown

Describe your changes

QuarkQuantization now requires and is tested against amd-quark 0.13, the current Quark release.

Why. The AMD CI installs amd-quark==0.10 (test/requirements-test-amd.txt), three releases behind the API the pass has used since #2532 (amd-quark>=0.12). So the pass's torch path wasn't tested against the Quark it targets.

Impact on users. The released olive-ai 0.13.0 still uses the Quark 0.11 API, and with any amd-quark since 0.12 its torch path fails:

ImportError: cannot import name 'revert_model_patching' from 'quark.torch.utils.llm'

pip install olive-ai amd-quark gives exactly that combination today. Main is fixed (#2532) but not released.

This PR:

  • test/requirements-test-amd.txt: amd-quark==0.13.
  • QuarkQuantization requires amd-quark>=0.13.0, in four places:
    • the olive_config.json extra;
    • the runtime version gates of the ONNX and torch paths;
    • the tests of those gates;
    • docs/source/features/quantization.md.

Verification. Tested with amd-quark 0.13, onnxruntime 1.28, torch 2.13 and transformers 5.15 / 5.22:

  • pytest test/passes/quark_quantizer passes (10 tests).
  • The pass runs AWQ uint4_wo_128 with a Hugging Face export on a tiny Llama.
  • The same flow runs in AMD Quark's CI on a Windows ROCm GPU (Strix Halo, gfx1151).

Request. Could this go into a release soon? Every released olive-ai fails with the current amd-quark.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a (not run; the change is version strings only)
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

QuarkQuantization requires amd-quark >= 0.13.

🤖 Generated with Claude Code

The AMD CI installed amd-quark==0.10 (test/requirements-test-amd.txt), three
releases behind the API the QuarkQuantization pass has used since microsoft#2532
(amd-quark>=0.12), so the pass's torch path was never tested against the
Quark it targets. Test against the current release, amd-quark 0.13, and make
it the pass's minimum (olive_config.json extra, the runtime version gates and
their tests, and the docs).

Verified with amd-quark 0.13, onnxruntime 1.28, torch 2.13 and transformers
5.15 / 5.22: test/passes/quark_quantizer passes (10 tests), and the pass runs
AWQ uint4_wo_128 with a Hugging Face export on a tiny Llama.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 20:11
@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

No active review issues are reported for the amd-quark 0.13 dependency and test-coverage updates.

No open issues 🎉

What changed in this PR

Aligns QuarkQuantization dependencies and AMD test coverage with amd-quark 0.13, building on the API updates introduced in #2532.

Changes:

  • Raises the minimum amd-quark version to 0.13 for both ONNX and PyTorch paths.
  • Pins AMD test dependencies to 0.13 and updates version-gate tests to reject 0.12.
  • Documents the new minimum version.
File Description
test/​requirements-test-amd.txt Pins amd-quark to 0.13 for AMD testing.
test/​passes/​quark_quantizer/​test_quark_onnx_quantization.py Updates both version-gate tests and expected errors.
olive/​passes/​quark_quantizer/​quark_quantization.py Requires amd-quark ≥0.13.0 in both runtime paths.
olive/​olive_config.json Updates the pass dependency to amd-quark ≥0.13.0.
docs/​source/​features/​quantization.md Documents the amd-quark 0.13 requirement.

Review effort: Balanced

@thiagocrepaldi

Copy link
Copy Markdown
Author

kunal-vaishnavi

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

No active review issues are identified for the amd-quark 0.13 dependency and test-environment alignment.

No open issues 🎉

Review effort: Balanced

@baijumeswani

Copy link
Copy Markdown

/azp run Olive CI

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 2793 in repo microsoft/Olive

@thiagocrepaldi

Copy link
Copy Markdown
Author

Thanks for the approvals. The only failing check is Docs, and it's GitHub rate-limiting the link check: both broken links are 429 Too Many Requests on microsoft/olive-recipes pages, not links this PR touches, and the same workflow passes on main. Could you rerun Docs (or merge if a rerun hits the limit again)?

@kunal-vaishnavi

Copy link
Copy Markdown
Contributor

/azp run Olive CI

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@thiagocrepaldi

Copy link
Copy Markdown
Author

Docs build passed, but it seems hf_token is missing in the linux cpu job
image

@kunal-vaishnavi

Copy link
Copy Markdown
Contributor

/azp run Olive CI

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

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.

5 participants