diff --git a/cmake/options.cmake b/cmake/options.cmake index 2f44e9a17caa755b7df2bc596998667682780505..3677418a98e22cefc6e8c127d12829e377928f1a 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -64,6 +64,7 @@ endif() if (ENABLE_GPU) set(ENABLE_GPUQUE ON) + add_compile_definitions(ENABLE_GPU_COLLECTIVE) endif() if (ENABLE_GE) diff --git a/mindspore/ccsrc/pipeline/init.cc b/mindspore/ccsrc/pipeline/init.cc index 7c77949fdaa1937ba62eff73cb0183fd8c440954..b709199c870b88f334e8bc606be5b7c23428e0bd 100644 --- a/mindspore/ccsrc/pipeline/init.cc +++ b/mindspore/ccsrc/pipeline/init.cc @@ -29,7 +29,7 @@ #include "parallel/context.h" #include "parallel/device_manager.h" #include "parallel/costmodel_context.h" -#ifdef ENABLE_GPUQUE +#ifdef ENABLE_GPU_COLLECTIVE #include "device/gpu/distribution/collective_init.h" #else #include "device/gpu/distribution/collective_fake_init.h" @@ -300,7 +300,7 @@ PYBIND11_MODULE(_c_expression, m) { (void)py::class_>(m, "Oplib") .def(py::init()) .def("reg_op", &OpLib::RegOp, "Register op info."); -#ifdef ENABLE_GPUQUE +#ifdef ENABLE_GPU_COLLECTIVE (void)m.def("init_gpu_collective", &mindspore::device::gpu::CollectiveInitializer::InitCollective, "Init gpu collective communication mode."); (void)m.def("finalize_gpu_collective", &mindspore::device::gpu::CollectiveInitializer::FinalizeCollective,