File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ if(BUILD_CUDA)
1919 message (FATAL_ERROR "CUDA_NVCC_GENCODES is deprecated, use CMAKE_CUDA_ARCHITECTURES instead" )
2020 endif ()
2121 add_definitions (-DWITH_CUDA )
22+ add_definitions (-DWITH_NPU )
23+
2224 # NOTE: For some unknown reason, CUDAToolkit_VERSION may become empty when running cmake again
2325 set (CUDA_VERSION ${CUDAToolkit_VERSION} CACHE STRING "" )
2426 if (NOT CUDA_VERSION)
Original file line number Diff line number Diff line change @@ -70,13 +70,15 @@ Runtime::Runtime(
7070 Singleton<RuntimeJobDescs>::Get ()->AddPlan (plan);
7171 collective_boxing_scheduler_plan_token_ =
7272 Singleton<boxing::collective::Scheduler>::Get ()->AddPlan (plan);
73+ #if defined(WITH_CUDA) || defined(WITH_NPU)
7374 const auto & vaild_ccl_comm_mgr_device_types =
7475 EagerCclCommMgrBuilder::Get ().vaild_ccl_comm_mgr_device_types ();
7576 if (!vaild_ccl_comm_mgr_device_types.empty () && !Singleton<EagerCclCommMgr>::Get ()) {
7677 Singleton<EagerCclCommMgr>::SetAllocated (
7778 EagerCclCommMgrBuilder::Get ().NewCclCommMgr (vaild_ccl_comm_mgr_device_types.front ()));
7879 }
7980 Singleton<EagerCclCommMgr>::Get ()->CreateCommFromPlan (plan);
81+ #endif // defined(WITH_CUDA) || defined(WITH_NPU)
8082 }
8183 std::vector<const TaskProto*> source_tasks;
8284 source_tasks.reserve (plan.task ().size ());
You can’t perform that action at this time.
0 commit comments