Skip to content

Enable TorchAO int4wo quantization tests on XPU#13537

Merged
sayakpaul merged 5 commits into
huggingface:mainfrom
jiqing-feng:torchao-xpu-int4wo
May 6, 2026
Merged

Enable TorchAO int4wo quantization tests on XPU#13537
sayakpaul merged 5 commits into
huggingface:mainfrom
jiqing-feng:torchao-xpu-int4wo

Conversation

@jiqing-feng
Copy link
Copy Markdown
Contributor

What does this PR do?

Enables TorchAO int4wo (Int4WeightOnlyConfig) quantization tests on Intel XPU devices.

Changes

  1. Remove _int4wo_skip marker: The int4wo tests were previously restricted to CUDA only. Removed this skip marker so they run on all accelerator backends.

  2. XPU-specific int4 packing format: Added XPU-specific handling in _get_quant_config() — Intel XPU requires int4_packing_format="plain_int32" for Int4WeightOnlyConfig.

@github-actions github-actions Bot added tests size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels Apr 22, 2026
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels Apr 22, 2026
@jiqing-feng
Copy link
Copy Markdown
Contributor Author

Hi @sayakpaul . Would you please review this PR? And the rests listed in there

@dg845 dg845 requested a review from sayakpaul May 1, 2026 05:05
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 1, 2026
Comment thread tests/models/testing_utils/quantization.py
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment

- Remove _int4wo_skip marker that restricted int4wo tests to CUDA only
- Add XPU-specific int4_packing_format='plain_int32' for Int4WeightOnlyConfig
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
@jiqing-feng jiqing-feng force-pushed the torchao-xpu-int4wo branch from 191414e to d77dd97 Compare May 6, 2026 01:49
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 6, 2026
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 6, 2026
@jiqing-feng
Copy link
Copy Markdown
Contributor Author

Hi @sayakpaul . I have fixed your comment. Please review it. Thanks!

@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 6, 2026
@sayakpaul
Copy link
Copy Markdown
Member

@bot /style

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Style bot fixed some files and pushed the changes.

@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels May 6, 2026
@sayakpaul sayakpaul merged commit 8ee10d8 into huggingface:main May 6, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR with diff < 50 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants