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 option to skip initializing the jax distributed system #1125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gobbleturk
Copy link
Collaborator

@gobbleturk gobbleturk commented Dec 23, 2024

Description

Add option to skip jax.distributed.initialize() explicitly.
This is necessary for internal runs with checkpointing, where the jax distributed system is initialized for us and should not be initialized explicitly

Tests

Ran with this new flag both true and false, saw expected results.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

@@ -219,6 +219,9 @@ def maybe_initialize_jax_distributed_system(raw_keys):

For CPUs, we call jax.distributed.initialize() explicitly, with the specified arguments.
"""
if raw_keys["skip_jax_distributed_system"]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Thanks for the log! So we know the reason to skip the initialization. Could you help add accordingly logs to following 2 cases? inference_benchmark_test & compile_topology?

Copy link
Collaborator

@RissyRan RissyRan left a comment

Choose a reason for hiding this comment

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

Others LGTM!

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