Skip to content

[xpu][test] Skip WIP config for Intel GPU in test_safetensors_support.py and test_x86inductor_fusion.py#4049

Merged
liangan1 merged 5 commits into
pytorch:mainfrom
zxd1997066:xiangdong/skip_safetensors
Mar 25, 2026
Merged

[xpu][test] Skip WIP config for Intel GPU in test_safetensors_support.py and test_x86inductor_fusion.py#4049
liangan1 merged 5 commits into
pytorch:mainfrom
zxd1997066:xiangdong/skip_safetensors

Conversation

@zxd1997066

@zxd1997066 zxd1997066 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

For #2917, This PR is targeted to skip WIP config for Intel GPU in test/prototype/safetensors/test_safetensors_support.py and test/quantization/pt2e/test_x86inductor_fusion.py

@pytorch-bot

pytorch-bot Bot commented Mar 11, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit fd653f3 with merge base fe98658 (image):

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Mar 11, 2026
@xiaowangintel xiaowangintel added ciflow/xpu label used to trigger xpu CI jobs xpu Intel XPU related features module: core changes affecting multiple modules, e.g. base config/tensor, observers, quant ops labels Mar 19, 2026
@pytorch-bot

pytorch-bot Bot commented Mar 19, 2026

Copy link
Copy Markdown

To add the ciflow label ciflow/xpu please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot pytorch-bot Bot removed the ciflow/xpu label used to trigger xpu CI jobs label Mar 19, 2026
@xiaowangintel xiaowangintel requested a review from liangan1 March 19, 2026 01:58
@xiaowangintel

Copy link
Copy Markdown
Collaborator

@liangan1 Please help to review this pr. It block xpu-ci.

@xiaowangintel xiaowangintel added the ciflow/xpu label used to trigger xpu CI jobs label Mar 19, 2026
@xiaowangintel

Copy link
Copy Markdown
Collaborator

@Stonepia Please help to review.

@@ -63,7 +63,7 @@
]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

XPU uses a different path for INT4 woq in the line 60., so we add skip here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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


# MX and NVFP4 configs require torch >= 2.11
if torch_version_at_least("2.11.0.dev"):
if not torch.xpu.is_available() and torch_version_at_least("2.11.0.dev"):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

MX format is not enable yet on Intel XPU.

@liangan1 liangan1 requested a review from jerryzh168 March 19, 2026 05:24
@zxd1997066 zxd1997066 force-pushed the xiangdong/skip_safetensors branch from 3fde9ea to bc7893b Compare March 19, 2026 05:36
@pytorch-bot pytorch-bot Bot removed the ciflow/xpu label used to trigger xpu CI jobs label Mar 19, 2026
@zxd1997066 zxd1997066 changed the title [xpu][test] Skip WIP config for Intel GPU in test/prototype/safetensors/test_safetensors_support.py [xpu][test] Skip WIP config for Intel GPU in test_safetensors_support.py and test_x86inductor_fusion.py Mar 19, 2026
@zxd1997066 zxd1997066 force-pushed the xiangdong/skip_safetensors branch from bc7893b to 01d473c Compare March 19, 2026 05:41
# Int4WeightOnlyConfig with tinygemm uses sm90a CUTLASS kernels which are not
# forward-compatible with sm100+
if not is_sm_at_least_100():
if not torch.xpu.is_available() and not is_sm_at_least_100():

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.

these xpu conditions are spread across the code base and makes it confusing on what is and is not supported on cuda and xpu, can you just have 1 branch for xpu and one branch for not xpu to make things clearer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, refined the code.

@zxd1997066 zxd1997066 force-pushed the xiangdong/skip_safetensors branch from 01d473c to dbf1641 Compare March 24, 2026 02:38
@liangan1 liangan1 added the ciflow/xpu label used to trigger xpu CI jobs label Mar 24, 2026
@liangan1 liangan1 requested a review from jerryzh168 March 24, 2026 02:46

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.

also this is pretty weird, why do we get the last device in _DEVICES?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed this line.

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.

I think you'll want to refactor this to use get_available_devices as well, like other files

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated

]

# plain_int32 only supports XPU
if _DEVICE in ("xpu"):

@jerryzh168 jerryzh168 Mar 24, 2026

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.

probably should be if torch.xpu.is_available() to be consistent with other conditions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated

@unittest.skipIf(
torch_version_at_least("2.11.0.dev"), "Doesn't work with torch 2.11.0.dev+"
)
@unittest.skipIf(torch.xpu.is_available(), "Doesn't support for XPU")

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.

nit: Doesn't work with XPU

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@pytorch-bot pytorch-bot Bot removed the ciflow/xpu label used to trigger xpu CI jobs label Mar 24, 2026
@zxd1997066 zxd1997066 requested a review from jerryzh168 March 24, 2026 05:25
@jerryzh168 jerryzh168 added the ciflow/xpu label used to trigger xpu CI jobs label Mar 24, 2026
@liangan1 liangan1 merged commit 8fca033 into pytorch:main Mar 25, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/xpu label used to trigger xpu CI jobs CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: core changes affecting multiple modules, e.g. base config/tensor, observers, quant ops xpu Intel XPU related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants