Skip to content
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

[Intel GPU] Add NestedTensorXPU to parseDispatchKey and codegen #140461

Closed

Conversation

min-jean-cho
Copy link
Collaborator

@min-jean-cho min-jean-cho commented Nov 12, 2024

Part of intel/torch-xpu-ops#1141.

Add NestedTensorXPU dispatch key.

>>> nt = torch.nested.nested_tensor([]).to("xpu")
>>> nt
nested_tensor([

], device='xpu:0')
>>> nt.is_xpu
True

Copy link

pytorch-bot bot commented Nov 12, 2024

🔗 Helpful Links

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

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 c894cb3 with merge base 9a051f6 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@min-jean-cho min-jean-cho added topic: not user facing topic category ciflow/xpu Run XPU CI tasks labels Nov 12, 2024
@min-jean-cho min-jean-cho marked this pull request as ready for review November 12, 2024 22:19
Copy link
Contributor

Attention! native_functions.yaml was changed

If you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, and one that makes use of it from Python, and land them two weeks apart. See https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy#forwards-compatibility-fc for more info.


Caused by:

@EikanWang EikanWang marked this pull request as draft November 13, 2024 00:22
@EikanWang EikanWang changed the title [Intel GPU] Add NestedTensorXPU dispatch key [WIP][Intel GPU] Add NestedTensorXPU dispatch key Nov 13, 2024
@EikanWang
Copy link
Collaborator

EikanWang commented Nov 13, 2024

@min-jean-cho , pls. help evaluate the failed cases.

@EikanWang
Copy link
Collaborator

It is a known issue and we will fix it -

xpu / linux-jammy-xpu-py3.9 / test (default, 2, 4, linux.idc.xpu) (gh)
inductor/test_decompose_mem_bound_mm.py::TestDecomposeMemMM::test_check_device

Copy link
Collaborator

Choose a reason for hiding this comment

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

We only need definition of NestedTensorXPU in PyTorch in-tree at the current stage. As a part of operator implementation, NestedTensorXPU is only used in torch-xpu-ops native_functions.yaml to declare a dispatch for XPU.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, updated.

@guangyey guangyey marked this pull request as ready for review November 13, 2024 02:07
@min-jean-cho min-jean-cho changed the title [WIP][Intel GPU] Add NestedTensorXPU dispatch key [Intel GPU] Add NestedTensorXPU dispatch key Nov 13, 2024
@guangyey
Copy link
Collaborator

guangyey commented Nov 13, 2024

Could we refine the title. NextedTensorXPU is already existed in PyTorch. Actually, this PR aims to add support for parsing NestedTensorXPU and codegen.

@min-jean-cho min-jean-cho changed the title [Intel GPU] Add NestedTensorXPU dispatch key [Intel GPU] Add NestedTensorXPU to parseDispatchKey and codegen Nov 13, 2024
@min-jean-cho
Copy link
Collaborator Author

Thanks @guangyey for feedback, updated.

@guangyey guangyey requested review from ezyang and malfet November 13, 2024 02:18
@ezyang
Copy link
Contributor

ezyang commented Nov 14, 2024

@pytorchbot merge -r

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 14, 2024
@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased minjean/xpu_nested_tensor onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout minjean/xpu_nested_tensor && git pull --rebase)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Ryo-not-rio pushed a commit to Ryo-not-rio/pytorch that referenced this pull request Dec 2, 2024
…rch#140461)

Add `NestedTensorXPU` dispatch key.
```
>>> nt = torch.nested.nested_tensor([]).to("xpu")
>>> nt
nested_tensor([

], device='xpu:0')
>>> nt.is_xpu
True
```
Pull Request resolved: pytorch#140461
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/ezyang
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…rch#140461)

Add `NestedTensorXPU` dispatch key.
```
>>> nt = torch.nested.nested_tensor([]).to("xpu")
>>> nt
nested_tensor([

], device='xpu:0')
>>> nt.is_xpu
True
```
Pull Request resolved: pytorch#140461
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/ezyang
fmo-mt pushed a commit to fmo-mt/pytorch that referenced this pull request Dec 11, 2024
…rch#140461)

Add `NestedTensorXPU` dispatch key.
```
>>> nt = torch.nested.nested_tensor([]).to("xpu")
>>> nt
nested_tensor([

], device='xpu:0')
>>> nt.is_xpu
True
```
Pull Request resolved: pytorch#140461
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/ezyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks Merged open source topic: not user facing topic category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants