Skip to content

Conversation

@Zantares
Copy link

@Zantares Zantares commented Sep 11, 2025

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
@Zantares
Copy link
Author

Zantares commented Oct 9, 2025

Seems the error is not related to my changes, the same error appeared in another PR without any changes: #9633

auto-merge was automatically disabled December 10, 2025 13:20

Head branch was pushed to by a user without write access

@Zantares Zantares force-pushed the tenglu/executable_destructor branch from 2c06f10 to 3df9ff5 Compare December 10, 2025 13:20
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