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

Support aten::split_with_sizes_copy.out/aten::_chunk_cat/aten::_chunk_cat.out to align with CUDA as a fast pass #1213

Closed
zhangxiaoli73 opened this issue Dec 25, 2024 · 1 comment
Assignees
Labels

Comments

@zhangxiaoli73
Copy link

zhangxiaoli73 commented Dec 25, 2024

🚀 The feature, motivation and pitch

Motivation

torch.split_with_sizes_copy.out is called in PyTorch FSDP2 https://github.com/pytorch/pytorch/blob/main/torch/distributed/fsdp/_fully_shard/_fsdp_collectives.py#L105

CUDA has a fast pass implementation for this aten op. https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/native_functions.yaml#L14757 . To achieve same performance as CUDA, please enable a similar fast path for XPU device.

Other cuda specific aten ops in FSDP2:
aten::_chunk_cat
https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/native_functions.yaml#L5720

aten::_chunk_cat.out
https://github.com/pytorch/pytorch/blob/main/aten/src/ATen/native/native_functions.yaml#L5725

Customer impact
FSDP2 performance on XPU device.

Alternatives

No response

Additional context

No response

@fengyuan14 fengyuan14 changed the title Support a aten split_with_sizes_copy.out fast path as CUDA Support aten::split_with_sizes_copy.out to align with CUDA as a fast pass Dec 25, 2024
@fengyuan14 fengyuan14 self-assigned this Dec 25, 2024
@zhangxiaoli73 zhangxiaoli73 changed the title Support aten::split_with_sizes_copy.out to align with CUDA as a fast pass Support aten::split_with_sizes_copy.out/aten::_chunk_cat/aten::_chunk_cat.out to align with CUDA as a fast pass Dec 25, 2024
@xytintel
Copy link
Contributor

#1089

@xytintel xytintel closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants