这是indexloc提供的服务,不要输入任何密码
Skip to content

Make CustomCallThunk own the associated HloComputation #97429

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Make CustomCallThunk own the associated HloComputation

CustomCallThunk used to hold a raw pointer to a HloComputation
that would be passed to the custom call target. It relied on the
HloComputation being alive as long as the thunk existed which is a thing
that we can't necessarily guarantee and it just happended to work.

There was an open TODO to replace the pointer by a copy of the HloComputation which is done in this CL.

This change is also a prerequisite for proto serialization of CustomCallThunk.

CustomCallThunk used to hold a raw pointer to a HloComputation
that would be passed to the custom call target. It relied on the
HloComputation being alive as long as the thunk existed which is a thing
that we can't necessarily guarantee and it just happended to work.

There was an open TODO to replace the pointer by a copy of the HloComputation which is done in this CL.

This change is also a prerequisite for proto serialization of CustomCallThunk.

PiperOrigin-RevId: 786251950
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