Skip to content

Commit

Permalink
update debug_single_process to false (#7695)
Browse files Browse the repository at this point in the history
  • Loading branch information
zpcore committed Jul 17, 2024
1 parent a6ab3fe commit 44f88a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test_train_mp_imagenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,5 @@ def _mp_fn(index, flags):
if __name__ == '__main__':
# if running with torchrun, nprocs argument will be omitted.
debug_single_process = True if FLAGS.num_cores == 1 else False
torch_xla.launch(_mp_fn, args=(FLAGS,), debug_single_process=True)
torch_xla.launch(
_mp_fn, args=(FLAGS,), debug_single_process=debug_single_process)
1 change: 1 addition & 0 deletions torch_xla/torch_xla.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def manual_seed(seed, device=None):
xm.set_rng_state(seed, device)


# TODO(wcromar): Update args to type ParamSpec.
def launch(
fn: Callable,
args: Tuple = (),
Expand Down

0 comments on commit 44f88a9

Please sign in to comment.