-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Ensure outer aliasing on DTensor matches inner aliasing #158954
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
Changes from all commits
565943d
abaee9d
34bb06f
63ca3e4
2a5fd23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,6 +450,12 @@ def is_out_variant_op(self) -> bool: | |
# be entirely correct, but it's good enough for now. | ||
return "out" in self.op._schema.overload_name | ||
|
||
def is_view_op(self) -> bool: | ||
return any( | ||
a.alias_info is not None and not a.alias_info.is_write | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does 'not is_write' have to do with it being a view? would a modified view not set this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm being a little defensive here. Mutating ops have a write alias like |
||
for a in self.op._schema.arguments | ||
) | ||
|
||
def __hash__(self) -> int: | ||
# Only hash args and kwargs that op indicates to hash | ||
if not self.schema_info: | ||
|
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.
When is this false? Is this due to h even sharding leaving one rank 'empty'?
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.
A DTensor is associated with a device mesh. The device mesh does NOT necessarily have to cover all of the GPUs that are actually known. We are still SPMD over everything, including things that are not in the mesh. Then those are not participating.