From 72995657681f6173413b5ee7c62bd91212d07e8d Mon Sep 17 00:00:00 2001 From: Howard Huang Date: Wed, 25 Aug 2021 11:53:24 -0700 Subject: [PATCH] Update torch.distributed.run OMP_NUM_THREADS message to log.warning (#63953) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63953 Closes #61138 Test: `python -m torch.distributed.run --nproc_per_node 2 test.py` Still outputs message `LOGLEVEL=ERROR python -m torch.distributed.run --nproc_per_node 2 test.py` Does not output message anymore cc pietern mrshenli pritamdamania87 zhaojuanmao satgera rohan-varma gqchen aazzolini osalpekar jiayisuse agolynski SciPioneer H-Huang mrzzd cbalioglu gcramer23 Test Plan: Imported from OSS Reviewed By: malfet Differential Revision: D30542997 Pulled By: H-Huang fbshipit-source-id: e7da30dcda51516abf4e56f1f510132e44397027 --- torch/distributed/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/distributed/run.py b/torch/distributed/run.py index 9fb88fa..f21fc4e 100644 --- a/torch/distributed/run.py +++ b/torch/distributed/run.py @@ -595,7 +595,7 @@ def config_from_args(args) -> Tuple[LaunchConfig, Union[Callable, str], List[str nproc_per_node = determine_local_world_size(args.nproc_per_node) if "OMP_NUM_THREADS" not in os.environ and nproc_per_node > 1: omp_num_threads = 1 - print( + log.warning( f"*****************************************\n" f"Setting OMP_NUM_THREADS environment variable for each process to be " f"{omp_num_threads} in default, to avoid your system being overloaded, " -- 2.7.4