mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-15 18:42:39 +00:00
Provides two integration ways for MSCCL++ DSL. 1. Integrate with customized communication group 2. Integrate with NCCL API Introduce new Python APIs to make it work: ```python mscclpp.compile # compile dsl to json based execution plan mscclpp.ExecutionPlanRegistry.register_plan(plan) # register the compiled plan to executionPlanRegistery mscclpp.ExecutionPlanRegistry.set_selector(selector) # set the selector, the selector will return the best execution plan based on collection, message size, world size.... ``` Fix #556 --------- Co-authored-by: Caio Rocha <caiorocha@microsoft.com> Co-authored-by: Changho Hwang <changhohwang@microsoft.com>
27 lines
1.0 KiB
CMake
27 lines
1.0 KiB
CMake
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT license.
|
|
|
|
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)
|
|
include(FetchContent)
|
|
FetchContent_Declare(nanobind GIT_REPOSITORY https://github.com/wjakob/nanobind.git GIT_TAG v1.4.0)
|
|
FetchContent_MakeAvailable(nanobind)
|
|
|
|
FetchContent_Declare(dlpack
|
|
GIT_REPOSITORY https://github.com/dmlc/dlpack.git
|
|
GIT_TAG 5c210da409e7f1e51ddf445134a4376fdbd70d7d
|
|
)
|
|
|
|
FetchContent_GetProperties(dlpack)
|
|
if(NOT dlpack_POPULATED)
|
|
FetchContent_Populate(dlpack)
|
|
# Add dlpack subdirectory but exclude it from installation
|
|
add_subdirectory(${dlpack_SOURCE_DIR} ${dlpack_BINARY_DIR} EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS *.cpp)
|
|
nanobind_add_module(mscclpp_py ${SOURCES})
|
|
set_target_properties(mscclpp_py PROPERTIES OUTPUT_NAME _mscclpp)
|
|
target_link_libraries(mscclpp_py PRIVATE dlpack mscclpp_static ${GPU_LIBRARIES})
|
|
target_include_directories(mscclpp_py SYSTEM PRIVATE ${GPU_INCLUDE_DIRS})
|
|
install(TARGETS mscclpp_py LIBRARY DESTINATION .)
|