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

[LTC] Adopt more LazyGraphExecutor virtual interfaces #4314

Merged
merged 10 commits into from
Dec 13, 2022

Conversation

alanwaketan
Copy link
Collaborator

@alanwaketan alanwaketan commented Dec 11, 2022

Summary:
This patch tries to adopt even more LazyGraphExecutor virtual interfaces:

  1. LazyGraphExecutor::Async.
  2. TensorCollectionBarrier
  3. SyncLiveTensorsGraph

And comments on methods that we don't adopt.

This depends on pytorch/pytorch#90650.

Test Plan:
CI.

coll->unlocker.size() > 0) {
return;
}
torch::lazy::LazyGraphExecutor::TensorCollectionBarrier(coll);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm so the reason we need to overwrite this function is for future SPMD use case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, or I can add the todo to the upstream. 😂

@@ -956,8 +924,7 @@ XLAGraphExecutor::PostOrderData XLAGraphExecutor::RunPostOrder(
}

XLAGraphExecutor::ComputationCache::TypePtr
XLAGraphExecutor::LookupCachedCompile(const std::vector<XLATensorPtr>& tensors,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, I guess at some point we dropped the use of tensors without noticing it.

@alanwaketan
Copy link
Collaborator Author

Thanks Jack for approving.

pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Dec 13, 2022
Summary:
This patch makes the following interfaces virtual for XLA to adopt:
1. LazyGraphExecutor::Async.
2. TensorCollectionBarrier
3. SyncLiveTensorsGraph

It's related to pytorch/xla#4314.

Test Plan:
CI.

Pull Request resolved: #90650
Approved by: https://github.com/wconstab
This reverts commit 7d2301e.
@alanwaketan alanwaketan merged commit 16e963f into master Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants