From 2b479e17745d37ebc1a2d519c9f0f720602da23a Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 7 Dec 2021 09:58:35 +0800 Subject: [PATCH] fix import error of GlooParallelContext (#37892) --- paddle/fluid/imperative/heter_ccl_context.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/imperative/heter_ccl_context.cc b/paddle/fluid/imperative/heter_ccl_context.cc index a62c1da7815..896f29fdd0c 100644 --- a/paddle/fluid/imperative/heter_ccl_context.cc +++ b/paddle/fluid/imperative/heter_ccl_context.cc @@ -92,8 +92,10 @@ HeterParallelContext::HeterParallelContext(const ParallelStrategy &strategy, inter_strategy_.local_rank_ = inter_rank; inter_strategy_.current_endpoint_ = strategy_.current_endpoint_; inter_strategy_.trainer_endpoints_ = inter_endpoints; +#ifdef PADDLE_WITH_GLOO inter_parallel_ctx_ = std::make_shared( inter_strategy_, platform::CPUPlace()); +#endif } VLOG(0) << "init inter size " << inter_endpoints.size() << " rank " -- GitLab