Skip to content

Commit

Permalink
Switch to using rapids-cython
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Jul 28, 2023
1 parent ef7c961 commit 1851e2e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 66 deletions.
11 changes: 5 additions & 6 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,9 @@ option(FIND_KVIKIO_CPP
"Search for existing KVIKIO C++ installations before defaulting to local files" OFF
)

find_package(PythonExtensions REQUIRED)
find_package(Cython REQUIRED)

# TODO: Should we symlink FindcuFile.cmake into python/cmake? find cuFile
include(../cpp/cmake/Modules/FindcuFile.cmake)

# Ignore unused variable warning.
set(ignored_variable "${SKBUILD}")

if(FIND_KVIKIO_CPP)
find_package(KvikIO ${kvikio_version})
else()
Expand All @@ -53,7 +47,12 @@ find_package(CUDAToolkit REQUIRED)

if(NOT KVIKIO_FOUND)
add_subdirectory(../cpp kvikio-cpp)
set(cython_lib_dir kvikio)
install(TARGETS kvikio DESTINATION ${cython_lib_dir})
endif()

include(rapids-cython)
rapids_cython_init()

add_subdirectory(cmake)
add_subdirectory(kvikio/_lib)
1 change: 0 additions & 1 deletion python/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
# =============================================================================

include(thirdparty/get_nvcomp.cmake)
include(kvikio_python_helpers.cmake)
53 changes: 0 additions & 53 deletions python/cmake/kvikio_python_helpers.cmake

This file was deleted.

12 changes: 6 additions & 6 deletions python/kvikio/_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# =============================================================================

# Set the list of Cython files to build
set(cython_modules arr libnvcomp libnvcomp_ll libkvikio)
set(cython_modules arr.pyx libnvcomp.pyx libnvcomp_ll.pyx libkvikio.pyx)

# Build all of the Cython targets
add_cython_modules("${cython_modules}")

target_link_libraries(libnvcomp nvcomp::nvcomp)
target_link_libraries(libnvcomp_ll nvcomp::nvcomp)
rapids_cython_create_modules(
CXX
SOURCE_FILES "${cython_modules}"
LINKED_LIBRARIES nvcomp::nvcomp
)

0 comments on commit 1851e2e

Please sign in to comment.