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

[DONOTREVIEW][DTenosr][Test] DTensor 2D sharding #124339

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

Conversation

wz337
Copy link
Contributor

@wz337 wz337 commented Apr 17, 2024

world_size = 6
mesh_shape(3, 2)
placements = (Shard(0), Shard(0))

print result:

self.rank=0, dtensor.to_local().shape=torch.Size([2]), dtensor.to_local()=tensor([0, 1], device='cuda:0')
self.rank=1, dtensor.to_local().shape=torch.Size([1]), dtensor.to_local()=tensor([2], device='cuda:1')
self.rank=2, dtensor.to_local().shape=torch.Size([2]), dtensor.to_local()=tensor([3, 4], device='cuda:2')
self.rank=3, dtensor.to_local().shape=torch.Size([1]), dtensor.to_local()=tensor([5], device='cuda:3')
self.rank=4, dtensor.to_local().shape=torch.Size([1]), dtensor.to_local()=tensor([6], device='cuda:4')
self.rank=5, dtensor.to_local().shape=torch.Size([1]), dtensor.to_local()=tensor([7], device='cuda:5')

Right now, the sharding result is:

rank0: [0, 1], rank1: [2]
rank2: [3, 4], rank3: [5]
rank4: [6], rank5: [7] 

This result is expected as DTensor don't handle padding right now.

What is expected with padding should be:

rank0: [0, 1], rank1: [4, 5]
rank2: [2, 3], rank3: [6, 7]
rank4: [], rank5: [] 

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @tianyu-l @wconstab @yf225 @chauhang @d4l3k

Copy link

pytorch-bot bot commented Apr 17, 2024

🔗 Helpful Links

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

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

❌ 3 New Failures, 1 Unrelated Failure

As of commit c859a2d with merge base dd3cea3 (image):

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.

@pytorch-bot pytorch-bot bot added oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor oncall: distributed Add this issue/PR to distributed oncall triage queue topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant