Skip to content

add torchao example for xpu#3577

Merged
liangan1 merged 13 commits intopytorch:mainfrom
ZhaoqiongZ:add_xpu_example/zzq
Jan 21, 2026
Merged

add torchao example for xpu#3577
liangan1 merged 13 commits intopytorch:mainfrom
ZhaoqiongZ:add_xpu_example/zzq

Conversation

@ZhaoqiongZ
Copy link
Copy Markdown
Contributor

@ZhaoqiongZ ZhaoqiongZ commented Jan 6, 2026

Summary: Add Intel XPU (BMG) Support Matrix and Examples

This PR updates the documentation and code samples to support Intel® BMG GPUs.

Key Changes:

  • Support Matrix: Added Intel BMG GPU compatibility for W4A16 (int4 weight) and A8W8 (int8/fp8 dynamic) quantization.
  • W4A16 XPU Example: Added a code snippet for torch.xpu using Int4WeightOnlyConfig with plain_int32 packing.
  • Installation: Included XPU-specific wheel URLs and developer build flags (USE_XPU=1).

The int4_packing_format differs between CUDA and CPU/XPU, so this needs to be clarified in the examples.

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jan 6, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3577

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5d4f3a6 with merge base 1df9cae (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 6, 2026
Co-authored-by: Zhang, Liangang  <liangang.zhang@intel.com>
@ZhaoqiongZ ZhaoqiongZ requested a review from liangan1 January 15, 2026 01:09
@ZhaoqiongZ ZhaoqiongZ requested a review from jerryzh168 January 19, 2026 01:43
@ZhaoqiongZ ZhaoqiongZ requested a review from liangan1 January 20, 2026 02:51
@ZhaoqiongZ ZhaoqiongZ requested a review from liangan1 January 20, 2026 05:57
@liangan1 liangan1 added the topic: documentation Use this tag if this PR adds or improves documentation label Jan 20, 2026
@liangan1 liangan1 merged commit 1cad375 into pytorch:main Jan 21, 2026
20 of 21 checks passed
jcaip pushed a commit that referenced this pull request Jan 22, 2026
* add torchao example for xpu

* add w4a16 example for xpu

* Update README.md

Co-authored-by: Zhang, Liangang  <liangang.zhang@intel.com>

* Update README.md removing cpu example

* Update torch/quantization readme  removing cpu example

* Update README.md with int8 quantization for intel gpu

* remove duplicated edge and update intel gpu int8 quantization

* remove int8 quantized training for intel gpu

* Update README.md

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: Zhang, Liangang <liangang.zhang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: documentation Use this tag if this PR adds or improves documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants