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

[XLA] Directly track callers and callees of an HloComputation. #23516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

[XLA] Directly track callers and callees of an HloComputation.

Currently there's no direct way to navigate from an HloComputation to its callers and callees. To determine the callees, one must iterate through all of the instructions in a computation, which can be slow. And there is no way to navigate to the callers of a computation other than iterating over all the computations in a module.

This change adds absl::btree_map<> data structures that allow one to navigate from an HloComputation to its callers and callees. For each neighbor, we keep a count of the number of references.

Currently there's no direct way to navigate from an HloComputation to its callers and callees. To determine the callees, one must iterate through all of the instructions in a computation, which can be slow. And there is no way to navigate to the callers of a computation other than iterating over all the computations in a module.

This change adds absl::btree_map<> data structures that allow one to navigate from an HloComputation to its callers and callees. For each neighbor, we keep a count of the number of references.

PiperOrigin-RevId: 734235296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant