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

Add Cache to Comm Group #4849

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add Cache to Comm Group #4849

wants to merge 5 commits into from

Conversation

cmikeh2
Copy link
Contributor

@cmikeh2 cmikeh2 commented Dec 20, 2023

This adds a global cache for creating new comm groups. Rather than returning unique objects, an identical group (same backend, same ranks) will share a single object. The motivation for including a cache like this is each creation of a group can reserve a small amount of memory that is not reclaimed when the object itself is freed. This creates a memory leak for a long-running application like MII where models may be destroyed and created many times.

Areas for feedback:

  1. Does this have any side effect for training workloads? Are there any assumptions that the group objects need to be unique?
  2. Does this make sense to have as an optional opt-in behavior or built with an additional wrapper, rather integrating it directly into new_group

@cmikeh2 cmikeh2 requested a review from awan-10 as a code owner December 20, 2023 22:18
@jomayeri jomayeri self-assigned this Sep 6, 2024
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