File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ option(USE_CCACHE "Attempt using CCache to wrap the compilation" ON)
55option (USE_MANYLINUX "Build for manylinux" OFF )
66
77option (BUILD_NVBENCH "Build the nvbench binary" OFF )
8+ option (INSTALL_PY_MODULE "Install python module to scalellm directory" OFF )
89
910set (CMAKE_CXX_STANDARD 17)
1011set (CMAKE_CXX_STANDARD_REQUIRED ON )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ pybind_extension(
1111 csrc/llm_handler.cpp
1212 csrc/module.cpp
1313 csrc/kernels.cu
14- DEFINES
14+ DEFINES
1515 PYBIND11_DETAILED_ERROR_MESSAGES=1
1616 LINKDIRS
1717 ${TORCH_INSTALL_PREFIX} /lib
@@ -25,3 +25,12 @@ pybind_extension(
2525 glog::glog
2626 Python::Module
2727)
28+
29+ if (INSTALL_PY_MODULE)
30+ add_custom_command (TARGET _C POST_BUILD
31+ COMMENT "Copying $<TARGET_FILE_NAME:_C> to scalellm directory"
32+ COMMAND ${CMAKE_COMMAND} -E create_symlink
33+ $<TARGET_FILE:_C>
34+ ${CMAKE_SOURCE_DIR} /scalellm/$<TARGET_FILE_NAME:_C>
35+ )
36+ endif ()
You can’t perform that action at this time.
0 commit comments