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

[DTensor] Add sharding strategy to aten.view.dtype #144286

Closed
cassanof opened this issue Jan 6, 2025 · 1 comment
Closed

[DTensor] Add sharding strategy to aten.view.dtype #144286

cassanof opened this issue Jan 6, 2025 · 1 comment
Labels
module: dtensor distributed tensor tag oncall: distributed Add this issue/PR to distributed oncall triage queue

Comments

@cassanof
Copy link
Contributor

cassanof commented Jan 6, 2025

🚀 The feature, motivation and pitch

Would be great to have a sharding strategy for aten.view.dtype. Currently, when doing .view(dtype) on a DTensor, you get the following error:

Operator aten.view.dtype does not have a sharding strategy registered.

This has caused issues for FSDP2 + stochastic rounding for me. See: pytorch/ao#1505

Alternatives

No response

Additional context

No response

cc @H-Huang @awgu @kwen2501 @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @c-p-i-o @tianyu-l @XilunWu

@awgu awgu added the module: dtensor distributed tensor tag label Jan 6, 2025
@awgu awgu added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Jan 6, 2025
@awgu
Copy link
Contributor

awgu commented Jan 6, 2025

We should be able to directly forward aten.view.dtype to the local tensor. cc: @tianyu-l @wanchaol @XilunWu @wz337 if someone wants to implement it

awgu added a commit that referenced this issue Jan 8, 2025
…se op"


Fixes #144286

Viewing a tensor to a different dtype is pointwise and does not require any redistribution.

cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab d4l3k c-p-i-o

[ghstack-poisoned]
awgu added a commit that referenced this issue Jan 8, 2025
Fixes #144286

Viewing a tensor to a different dtype is pointwise and does not require any redistribution.

cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab d4l3k c-p-i-o

[ghstack-poisoned]
awgu added a commit that referenced this issue Jan 8, 2025
…se op"


Fixes #144286

Viewing a tensor to a different dtype is pointwise and does not require any redistribution.

cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab d4l3k c-p-i-o

[ghstack-poisoned]
awgu added a commit that referenced this issue Jan 8, 2025
Fixes #144286

Viewing a tensor to a different dtype is pointwise and does not require any redistribution.

cc H-Huang kwen2501 wanchaol fegin fduwjj wz337 wconstab d4l3k c-p-i-o

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: dtensor distributed tensor tag oncall: distributed Add this issue/PR to distributed oncall triage queue
Projects
None yet
Development

No branches or pull requests

2 participants