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

[Core][Distributed] add cleanup code for model parallel #4471

Closed
wants to merge 2 commits into from

Conversation

youkaichao
Copy link
Member

I did a quick search and find that only test code calls destroy_model_parallel:

destroy_model_parallel()

destroy_model_parallel()

This means user's code never called destroy_model_parallel.

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

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

Why is this needed?

@youkaichao
Copy link
Member Author

I met some strange cleanup bugs today, and find the bug is in the cleanup logic.

I think the problem is, user's code never called destroy_model_parallel , so the resource of model parallel group is never released, leading to strange errors like #3829 (comment) (which is "fixed" in #3702 ).

However, I admit that I'm not confident with this. The bug is unstable and difficult to reproduce.

@simon-mo
Copy link
Collaborator

but this is called?

def __del__(self):
# `dist` module might have been already destroyed
if hasattr(dist, 'destroy_process_group'):
dist.destroy_process_group()

@youkaichao
Copy link
Member Author

close in favor of #4508 .

@youkaichao youkaichao closed this May 2, 2024
@youkaichao youkaichao deleted the parallel_cleanup branch May 17, 2024 07:01
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.

3 participants