Skip to content

enable FP_Qaunt on xpu, validated#11

Merged
Godofnothing merged 1 commit intoIST-DASLab:masterfrom
yao-matrix:master
Oct 25, 2025
Merged

enable FP_Qaunt on xpu, validated#11
Godofnothing merged 1 commit intoIST-DASLab:masterfrom
yao-matrix:master

Conversation

@yao-matrix
Copy link
Contributor

@yao-matrix yao-matrix commented Oct 24, 2025

Since 2.6, PyTorch introduce torch.accelerator to extend built-in device support beyond CUDA GPU. Other accelerators like Intel XPU already supported through this mechanism officially by PyTorch.

In this PR, we want to extend FP_Quant support to Intel XPU, too. Hugging Face transformers FP-Quant psedo-quant(w/ triton backend) test cases are all passed on XPU. For QUBLAS backend, since current gen of Intel XPU doesn't support MIXFP4/NVFP4 in hardware yet, we will start to support once our next Gen XPU Crescent Island is out. But it will not impact this PR.

The code is back-compatible, when users install a earlier torch which doesn't support, it will fallback to directly use cuda.

Thx very much.

Signed-off-by: Yao, Matrix <matrix.yao@intel.com>
@yao-matrix
Copy link
Contributor Author

@BlackSamorez @Godofnothing , pls help review, thx very much.

@yao-matrix yao-matrix closed this Oct 24, 2025
@yao-matrix yao-matrix reopened this Oct 24, 2025
Copy link
Member

@Godofnothing Godofnothing left a comment

Choose a reason for hiding this comment

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

Thank you very much for your contribution.

I have reviewed the code at the changes to make sense.

Therefore, I am approving the PR.

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.

2 participants