Skip to content

Commit 6ab87b0

Browse files
committed
use in-tree build dir and install to src to speedup editable build
1 parent 5cb5322 commit 6ab87b0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.slo
33
*.lo
44
*.o
5+
*.so
56
*.obj
67
*.pyc
78

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ if(NOT "${SKBUILD_SABI_VERSION}" STREQUAL "")
164164
endif()
165165

166166
python_add_library(cython_wrapper MODULE "${CMAKE_BINARY_DIR}/cython_wrapper.cpp" ${USE_SABI} WITH_SOABI)
167-
install(TARGETS cython_wrapper LIBRARY DESTINATION tilelang)
168167

169168
# let libtilelang to search tvm/tvm_runtime in same dir
170169
if(APPLE)
@@ -175,12 +174,13 @@ else()
175174
set_target_properties(tilelang_module PROPERTIES INSTALL_RPATH "\$ORIGIN")
176175
endif()
177176

178-
install(TARGETS tvm tvm_runtime tilelang_module tilelang LIBRARY DESTINATION tilelang/lib)
177+
install(TARGETS cython_wrapper LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/tilelang")
178+
install(TARGETS tvm tvm_runtime tilelang_module tilelang LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/tilelang/lib")
179179

180180
# Copy tvm cython ext for wheels
181181
# TODO: not necessary for editable builds
182182
if(TVM_BUILD_FROM_SOURCE)
183183
add_dependencies(tilelang tvm_cython)
184-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/python/tvm/ffi/core.abi3.so" DESTINATION tilelang/3rdparty/tvm/python/tvm/ffi/)
184+
# install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/python/tvm/ffi/core.abi3.so" DESTINATION tilelang/3rdparty/tvm/python/tvm/ffi/)
185185
endif()
186186

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ build-backend = "scikit_build_core.build"
5656
[tool.scikit-build]
5757
wheel.py-api = "cp38"
5858
cmake.version = ">=3.26.1"
59+
build-dir = "build"
60+
61+
editable.rebuild = true
5962

6063
# Include backend and git info in version
6164
metadata.version.provider = "version_provider"

0 commit comments

Comments
 (0)