Skip to content

Conversation

Zantares
Copy link

This PR is to add a destructor for XLAGraphExecutor, to trigger the destructor of PJRT class Executable/LoadedExecutable. This helps to do some special works (e.g. clear disk) when the PJRT program is over.

Backgroud

The PJRT plugins may want to do some special operations when the Executable/LoadedExecutable is destructed, but in Torch-XLA, the Executable/LoadedExecutable will never be destructed since a raw pointer computation_cache_ has stored these objects and is never released:

Detail

Add a destructor for XLAGraphExecutor, to clear and delete this raw pointer.

Copy link
Collaborator

@qihqi qihqi left a comment

Choose a reason for hiding this comment

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

thanks!

@qihqi qihqi enabled auto-merge (squash) September 18, 2025 00:23
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.

2 participants