Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Enable XPU distributed test for PT2.8 #149916

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

@daisyden daisyden requested review from mruberry and a team as code owners March 25, 2025 03:27
Copy link

pytorch-bot bot commented Mar 25, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 0e7a7b6 with merge base a09a3f4 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (fsdp) release notes category labels Mar 25, 2025
@guangyey guangyey requested a review from EikanWang March 26, 2025 03:44
@guangyey guangyey moved this to Pre-Review Required in PyTorch Intel Mar 26, 2025
@@ -19,6 +19,7 @@
TransformerBlock,
)

device_type = torch.accelerator.current_accelerator().type
Copy link
Collaborator

@guangyey guangyey Mar 26, 2025

Choose a reason for hiding this comment

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

Here will raise an Error if the current accelerator returns None.

default_stream = torch.cuda.current_stream()
stream = torch.cuda.Stream()
default_stream = torch.accelerator.current_stream()
stream = torch.xpu.Stream() if device_type == "xpu" else torch.cuda.Stream()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
stream = torch.xpu.Stream() if device_type == "xpu" else torch.cuda.Stream()
stream = torch.Stream()

@guangyey guangyey marked this pull request as draft March 26, 2025 03:57
@guangyey
Copy link
Collaborator

@daisyden This PR involves a significant code change, so I prefer to mark it as a draft until it's CI-ready and the internal review comments have been addressed. The main goal of this PR is to generalize the unit tests to be device-agnostic and enable XPU support on top of it. Would it be possible to split this PR into two separate ones: one focused on the generalization, and the other aimed at enabling XPU?

Signed-off-by: Cheng Penghui <[email protected]>
@etaf etaf added the ciflow/xpu Run XPU CI tasks label Apr 25, 2025
Copy link

pytorch-bot bot commented Apr 25, 2025

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 Run XPU CI tasks label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: dynamo module: inductor oncall: distributed Add this issue/PR to distributed oncall triage queue open source release notes: distributed (fsdp) release notes category
Projects
Status: Pre-Review Required
Development

Successfully merging this pull request may close these issues.

6 participants