-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Support of dtensor redistribute with device order #160266
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
base: gh/zpcore/12/base
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/160266
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New Failures, 13 Pending, 1 Unrelated FailureAs of commit 12fe67c with merge base 24257f5 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
): | ||
mesh_dim_size = device_mesh.size(mesh_dim=mesh_dim) | ||
current_placement = sorted_dst_placement[mesh_dim] | ||
assert isinstance(current_placement, Shard) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be doing something wrong when trying this out, but I'm hitting this assertion, where current_placement
is Replicate.
[Prototype; for RFC, not ready for review] Now redistribute dtensor honors the device ordering. If no order information specified, it will use the default device order [0,1,2,...]. We can specify `device_order` as follow: ``` sharded_dt = distribute_tensor(input_data, mesh, placement, device_order) ``` and ``` out_dt = sharded_dt.redistribute(mesh, placement, device_order) ``` Note that device order information is added into the DTensorSpec. So `redistribute_local_tensor` doesn't need the `src_device_order` and `dst_device_order`. I leave them here as a reference for AutoParallel (cc fmassa ). I will remove those order related args from redistributed related API in this PR. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k pragupta [ghstack-poisoned]
[Prototype; for RFC, not ready for review] Now redistribute dtensor honors the device ordering. If no order information specified, it will use the default device order [0,1,2,...]. We can specify `device_order` as follow: ``` sharded_dt = distribute_tensor(input_data, mesh, placement, device_order) ``` and ``` out_dt = sharded_dt.redistribute(mesh, placement, device_order) ``` Note that device order information is added into the DTensorSpec. So `redistribute_local_tensor` doesn't need the `src_device_order` and `dst_device_order`. I leave them here as a reference for AutoParallel (cc fmassa ). I will remove those order related args from redistributed related API in this PR. cc H-Huang awgu wanchaol fegin fduwjj wz337 wconstab d4l3k pragupta [ghstack-poisoned]
[Prototype; for RFC, not ready for review]
Now redistribute dtensor honors the device ordering. If no order information specified, it will use the default device order [0,1,2,...]. We can specify
device_order
as follow:and
Note that device order information is added into the DTensorSpec. So
redistribute_local_tensor
doesn't need thesrc_device_order
anddst_device_order
. I leave them here as a reference for AutoParallel (cc @fmassa ). I will remove those order related args from redistributed related API in this PR.Stack from ghstack (oldest at bottom):
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta