Skip to content

Commit

Permalink
Use an object library for Python
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Nov 28, 2024
1 parent 16846b3 commit 996f038
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions python/cuvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ endif()

rapids_cython_init()

add_library(rmm_logger OBJECT)
target_link_libraries(rmm_logger PRIVATE rmm::rmm_logger_impl)

add_subdirectory(cuvs/common)
add_subdirectory(cuvs/distance)
add_subdirectory(cuvs/neighbors)
Expand Down
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/distance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
2 changes: 1 addition & 1 deletion python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ rapids_cython_create_modules(
)

foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS)
target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl)
target_link_libraries(${tgt} PRIVATE rmm_logger)
endforeach()
6 changes: 3 additions & 3 deletions python/cuvs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ authors = [
license = { text = "Apache 2.0" }
requires-python = ">=3.10"
dependencies = [
"cuda-python",
"cuda-python>=12.0,<13.0a0,<=12.6.0",
"numpy>=1.23,<3.0a0",
"nvidia-cublas",
"nvidia-curand",
Expand All @@ -49,7 +49,7 @@ classifiers = [

[project.optional-dependencies]
test = [
"cupy-cuda11x>=12.0.0",
"cupy-cuda12x>=12.0.0",
"pytest-cov",
"pytest==7.*",
"scikit-learn",
Expand Down Expand Up @@ -125,7 +125,7 @@ regex = "(?P<value>.*)"
[tool.rapids-build-backend]
requires = [
"cmake>=3.26.4,!=3.30.0",
"cuda-python",
"cuda-python>=12.0,<13.0a0,<=12.6.0",
"cython>=3.0.0",
"ninja",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
Expand Down

0 comments on commit 996f038

Please sign in to comment.