File tree 2 files changed +11
-1
lines changed
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)
5
5
option (USE_MANYLINUX "Build for manylinux" OFF )
6
6
7
7
option (BUILD_NVBENCH "Build the nvbench binary" OFF )
8
+ option (INSTALL_PY_MODULE "Install python module to scalellm directory" OFF )
8
9
9
10
set (CMAKE_CXX_STANDARD 17)
10
11
set (CMAKE_CXX_STANDARD_REQUIRED ON )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ pybind_extension(
11
11
csrc/llm_handler.cpp
12
12
csrc/module.cpp
13
13
csrc/kernels.cu
14
- DEFINES
14
+ DEFINES
15
15
PYBIND11_DETAILED_ERROR_MESSAGES=1
16
16
LINKDIRS
17
17
${TORCH_INSTALL_PREFIX} /lib
@@ -25,3 +25,12 @@ pybind_extension(
25
25
glog::glog
26
26
Python::Module
27
27
)
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