Skip to content

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. 😂

}

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.

@alanwaketan alanwaketan force-pushed the alanwaketan/lazy_graph_4 branch from 825f929 to 7d2301e Compare December 13, 2022 04:32
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
tracing Lazy Tensor tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants