From 93229949d45b91ba8e495705d4e6db71f513e4db Mon Sep 17 00:00:00 2001 From: Sean Murray <59740888+seanmurr1@users.noreply.github.com> Date: Mon, 18 Jul 2022 15:13:08 -0400 Subject: [PATCH] Fix bug where onnxruntime_USE_NCCL flag would default to ON (#12195) Fix bug where onnxruntime_USE_NCCL flag would default to ON, causing ORT to not build properly. New functionality: flag is ON when training is enabled and NCCL is not disabled. Flag is OFF otherwise --- tools/ci_build/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index c1e01d2291..e262703bb9 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -885,7 +885,7 @@ def generate_build_tree( "-Donnxruntime_ENABLE_TRAINING_TORCH_INTEROP=" + ("ON" if args.enable_training_torch_interop else "OFF"), # Enable advanced computations such as AVX for some traininig related ops. "-Donnxruntime_ENABLE_CPU_FP16_OPS=" + ("ON" if args.enable_training else "OFF"), - "-Donnxruntime_USE_NCCL=" + ("OFF" if args.disable_nccl else "ON"), + "-Donnxruntime_USE_NCCL=" + ("ON" if args.enable_training and not args.disable_nccl else "OFF"), "-Donnxruntime_BUILD_BENCHMARKS=" + ("ON" if args.build_micro_benchmarks else "OFF"), "-Donnxruntime_USE_ROCM=" + ("ON" if args.use_rocm else "OFF"), "-DOnnxruntime_GCOV_COVERAGE=" + ("ON" if args.code_coverage else "OFF"),