From ae6c3229e4b337150cc5d7a9b57ef9282c719a95 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Sun, 17 Nov 2024 18:10:35 +0000 Subject: [PATCH 01/22] Adapt to rmm logger changes --- cpp/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index eb2e7c7a4..03354a103 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -480,12 +480,12 @@ if(BUILD_SHARED_LIBS) "$<$:${CUVS_CUDA_FLAGS}>" ) target_link_libraries( - cuvs_objs PUBLIC raft::raft rmm::rmm ${CUVS_CTK_MATH_DEPENDENCIES} - $ + cuvs_objs PUBLIC raft::raft rmm::rmm rmm::rmm_logger ${CUVS_CTK_MATH_DEPENDENCIES} + $ $ ) - add_library(cuvs SHARED $) - add_library(cuvs_static STATIC $) + add_library(cuvs SHARED $,EXCLUDE,rmm.*logger>) + add_library(cuvs_static STATIC $,EXCLUDE,rmm.*logger>) target_compile_options( cuvs INTERFACE $<$:--expt-extended-lambda From 9e151ff96321d8093a23dbc81653e5e984fea019 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 20:38:38 +0000 Subject: [PATCH 02/22] Make linkage unconditional and private --- cpp/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 03354a103..441cdee8d 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -481,7 +481,8 @@ if(BUILD_SHARED_LIBS) ) target_link_libraries( cuvs_objs PUBLIC raft::raft rmm::rmm rmm::rmm_logger ${CUVS_CTK_MATH_DEPENDENCIES} - $ $ + $ + PRIVATE rmm::rmm_logger_impl ) add_library(cuvs SHARED $,EXCLUDE,rmm.*logger>) From 67e0fbca66b20476938dccd3fc497c7ef5bec93a Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 22:44:03 +0000 Subject: [PATCH 03/22] Also link to the logger in the tests --- cpp/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index 286d721d7..a5367ba3e 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -49,6 +49,7 @@ function(ConfigureTest) PRIVATE cuvs cuvs::cuvs raft::raft + rmm::rmm_logger_impl GTest::gtest GTest::gtest_main Threads::Threads From 09e99f89600dd180f98589dec428acaeba0eb454 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 22:48:42 +0000 Subject: [PATCH 04/22] Use an object library to avoid recompilation --- cpp/test/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpp/test/CMakeLists.txt b/cpp/test/CMakeLists.txt index a5367ba3e..16663ba08 100644 --- a/cpp/test/CMakeLists.txt +++ b/cpp/test/CMakeLists.txt @@ -49,7 +49,7 @@ function(ConfigureTest) PRIVATE cuvs cuvs::cuvs raft::raft - rmm::rmm_logger_impl + test_rmm_logger GTest::gtest GTest::gtest_main Threads::Threads @@ -88,6 +88,9 @@ function(ConfigureTest) ) endfunction() +add_library(test_rmm_logger OBJECT) +target_link_libraries(test_rmm_logger PRIVATE rmm::rmm_logger_impl) + # ################################################################################################## # test sources ################################################################################## # ################################################################################################## From 78b4e9a0eb081ee702fda96aeffc85260a48d75f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 23:14:34 +0000 Subject: [PATCH 05/22] Also add to examples --- examples/cpp/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 092b65ed9..d8d5f45c0 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -44,10 +44,10 @@ add_executable(VAMANA_EXAMPLE src/vamana_example.cu) # `$` is a generator expression that ensures that targets are # installed in a conda environment, if one exists -target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $) +target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) target_link_libraries( - CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads + CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Thread rmm::rmm_logger_impls ) -target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $) -target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $) -target_link_libraries(VAMANA_EXAMPLE PRIVATE cuvs::cuvs $) +target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) +target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) +target_link_libraries(VAMANA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) From 5c3390771c45acd9094073a00610feb46dd3e3f7 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 23:17:35 +0000 Subject: [PATCH 06/22] Also add target to Python packages --- python/cuvs/cuvs/common/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/distance/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/CMakeLists.txt | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/python/cuvs/cuvs/common/CMakeLists.txt b/python/cuvs/cuvs/common/CMakeLists.txt index 202919e01..f007bc922 100644 --- a/python/cuvs/cuvs/common/CMakeLists.txt +++ b/python/cuvs/cuvs/common/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX common_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/distance/CMakeLists.txt b/python/cuvs/cuvs/distance/CMakeLists.txt index 363778a9c..71cad5601 100644 --- a/python/cuvs/cuvs/distance/CMakeLists.txt +++ b/python/cuvs/cuvs/distance/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX distance_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/CMakeLists.txt b/python/cuvs/cuvs/neighbors/CMakeLists.txt index f68bbea53..fe2965070 100644 --- a/python/cuvs/cuvs/neighbors/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/CMakeLists.txt @@ -29,3 +29,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_refine_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() From 0dd462e680958b6eb4ab32c6f0b4c40856441585 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 23:35:15 +0000 Subject: [PATCH 07/22] Typo --- python/cuvs/cuvs/common/CMakeLists.txt | 2 +- python/cuvs/cuvs/distance/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cuvs/cuvs/common/CMakeLists.txt b/python/cuvs/cuvs/common/CMakeLists.txt index f007bc922..929c0dd59 100644 --- a/python/cuvs/cuvs/common/CMakeLists.txt +++ b/python/cuvs/cuvs/common/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) endforeach() diff --git a/python/cuvs/cuvs/distance/CMakeLists.txt b/python/cuvs/cuvs/distance/CMakeLists.txt index 71cad5601..3ecbf78f7 100644 --- a/python/cuvs/cuvs/distance/CMakeLists.txt +++ b/python/cuvs/cuvs/distance/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) endforeach() diff --git a/python/cuvs/cuvs/neighbors/CMakeLists.txt b/python/cuvs/cuvs/neighbors/CMakeLists.txt index fe2965070..2c362fd7f 100644 --- a/python/cuvs/cuvs/neighbors/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/CMakeLists.txt @@ -31,5 +31,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_library(${tgt} PRIVATE rmm::rmm_logger_impl) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) endforeach() From b828cabc5c1210925736599c989c5e3cb98a8763 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 27 Nov 2024 23:55:09 +0000 Subject: [PATCH 08/22] One more typo --- examples/cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index d8d5f45c0..80a621f71 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -46,7 +46,7 @@ add_executable(VAMANA_EXAMPLE src/vamana_example.cu) # installed in a conda environment, if one exists target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) target_link_libraries( - CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Thread rmm::rmm_logger_impls + CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads rmm::rmm_logger_impls ) target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) From 1c031063e6005cf5884c688788fcc46e27228b20 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:15:02 +0000 Subject: [PATCH 09/22] Another typo :( --- examples/cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 80a621f71..ade619133 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -46,7 +46,7 @@ add_executable(VAMANA_EXAMPLE src/vamana_example.cu) # installed in a conda environment, if one exists target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) target_link_libraries( - CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads rmm::rmm_logger_impls + CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads rmm::rmm_logger_impl ) target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) From bed2a45e326064f5ec51de02ccfde829380b065c Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:43:39 +0000 Subject: [PATCH 10/22] More Python packages --- python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/filters/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt | 4 ++++ python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt index 4806fb9fc..d6abf06a9 100644 --- a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt @@ -23,3 +23,7 @@ rapids_cython_create_modules( LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_brute_force_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt index 87e6597fe..9555685d9 100644 --- a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_cagra_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt index c90615feb..4e6f62597 100644 --- a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_prefilter_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt index 1f9c422ca..fd7bb6fd8 100644 --- a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_hnsw_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt index 09bd8f422..4eb2e707e 100644 --- a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_ivf_flat_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() diff --git a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt index 97c3a1824..f224a94e2 100644 --- a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt @@ -22,3 +22,7 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ASSOCIATED_TARGETS cuvs MODULE_PREFIX neighbors_pq_ ) + +foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) + target_link_libraries(${tgt} PRIVATE rmm::rmm_logger_impl) +endforeach() From 16846b3041f7b2116430f1481576eee2cafac0cc Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:45:27 +0000 Subject: [PATCH 11/22] Use an object library for the examples --- examples/cpp/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index ade619133..48815b870 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -44,10 +44,13 @@ add_executable(VAMANA_EXAMPLE src/vamana_example.cu) # `$` is a generator expression that ensures that targets are # installed in a conda environment, if one exists -target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) +add_library(rmm_logger OBJECT) +target_link_libraries(rmm_logger PRIVATE rmm::rmm_logger_impl) + +target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $ rmm_logger) target_link_libraries( - CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads rmm::rmm_logger_impl + CAGRA_PERSISTENT_EXAMPLE PRIVATE cuvs::cuvs $ Threads::Threads rmm_logger ) -target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) -target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) -target_link_libraries(VAMANA_EXAMPLE PRIVATE cuvs::cuvs $ rmm::rmm_logger_impl) +target_link_libraries(IVF_PQ_EXAMPLE PRIVATE cuvs::cuvs $ rmm_logger) +target_link_libraries(IVF_FLAT_EXAMPLE PRIVATE cuvs::cuvs $ rmm_logger) +target_link_libraries(VAMANA_EXAMPLE PRIVATE cuvs::cuvs $ rmm_logger) From 996f0385d5c80ce9bcf4f99d1fdb412354c93643 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:47:22 +0000 Subject: [PATCH 12/22] Use an object library for Python --- python/cuvs/CMakeLists.txt | 3 +++ python/cuvs/cuvs/common/CMakeLists.txt | 2 +- python/cuvs/cuvs/distance/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/filters/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt | 2 +- python/cuvs/pyproject.toml | 6 +++--- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/python/cuvs/CMakeLists.txt b/python/cuvs/CMakeLists.txt index feb3bd58c..33070020c 100644 --- a/python/cuvs/CMakeLists.txt +++ b/python/cuvs/CMakeLists.txt @@ -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) diff --git a/python/cuvs/cuvs/common/CMakeLists.txt b/python/cuvs/cuvs/common/CMakeLists.txt index 929c0dd59..ee0776fb5 100644 --- a/python/cuvs/cuvs/common/CMakeLists.txt +++ b/python/cuvs/cuvs/common/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/distance/CMakeLists.txt b/python/cuvs/cuvs/distance/CMakeLists.txt index 3ecbf78f7..08af49536 100644 --- a/python/cuvs/cuvs/distance/CMakeLists.txt +++ b/python/cuvs/cuvs/distance/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/CMakeLists.txt b/python/cuvs/cuvs/neighbors/CMakeLists.txt index 2c362fd7f..77049d797 100644 --- a/python/cuvs/cuvs/neighbors/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt index d6abf06a9..44ec5a75f 100644 --- a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt index 9555685d9..b2ad5d276 100644 --- a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt index 4e6f62597..1c8e42e0b 100644 --- a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt index fd7bb6fd8..5b0b39cb2 100644 --- a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt index 4eb2e707e..0d627dcf1 100644 --- a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt @@ -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() diff --git a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt index f224a94e2..8e528b6ad 100644 --- a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt @@ -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() diff --git a/python/cuvs/pyproject.toml b/python/cuvs/pyproject.toml index 155e454a8..17faf1065 100644 --- a/python/cuvs/pyproject.toml +++ b/python/cuvs/pyproject.toml @@ -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", @@ -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", @@ -125,7 +125,7 @@ regex = "(?P.*)" [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`. From 8f05d25f817d79aab3c4e462abe9cb7cefd1e8a0 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:49:53 +0000 Subject: [PATCH 13/22] Revert erroneous pyproject changes --- python/cuvs/pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cuvs/pyproject.toml b/python/cuvs/pyproject.toml index 17faf1065..155e454a8 100644 --- a/python/cuvs/pyproject.toml +++ b/python/cuvs/pyproject.toml @@ -31,7 +31,7 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.10" dependencies = [ - "cuda-python>=12.0,<13.0a0,<=12.6.0", + "cuda-python", "numpy>=1.23,<3.0a0", "nvidia-cublas", "nvidia-curand", @@ -49,7 +49,7 @@ classifiers = [ [project.optional-dependencies] test = [ - "cupy-cuda12x>=12.0.0", + "cupy-cuda11x>=12.0.0", "pytest-cov", "pytest==7.*", "scikit-learn", @@ -125,7 +125,7 @@ regex = "(?P.*)" [tool.rapids-build-backend] requires = [ "cmake>=3.26.4,!=3.30.0", - "cuda-python>=12.0,<13.0a0,<=12.6.0", + "cuda-python", "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`. From b3a155443dc5b62c73e674415a6f8b0499a63a05 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 00:58:42 +0000 Subject: [PATCH 14/22] Uniquify target name --- python/cuvs/CMakeLists.txt | 4 ++-- python/cuvs/cuvs/common/CMakeLists.txt | 2 +- python/cuvs/cuvs/distance/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/filters/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt | 2 +- python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/cuvs/CMakeLists.txt b/python/cuvs/CMakeLists.txt index 33070020c..c0990995f 100644 --- a/python/cuvs/CMakeLists.txt +++ b/python/cuvs/CMakeLists.txt @@ -110,8 +110,8 @@ endif() rapids_cython_init() -add_library(rmm_logger OBJECT) -target_link_libraries(rmm_logger PRIVATE rmm::rmm_logger_impl) +add_library(cuvs_rmm_logger OBJECT) +target_link_libraries(cuvs_rmm_logger PRIVATE rmm::rmm_logger_impl) add_subdirectory(cuvs/common) add_subdirectory(cuvs/distance) diff --git a/python/cuvs/cuvs/common/CMakeLists.txt b/python/cuvs/cuvs/common/CMakeLists.txt index ee0776fb5..361f2fafc 100644 --- a/python/cuvs/cuvs/common/CMakeLists.txt +++ b/python/cuvs/cuvs/common/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/distance/CMakeLists.txt b/python/cuvs/cuvs/distance/CMakeLists.txt index 08af49536..514b08c43 100644 --- a/python/cuvs/cuvs/distance/CMakeLists.txt +++ b/python/cuvs/cuvs/distance/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/CMakeLists.txt b/python/cuvs/cuvs/neighbors/CMakeLists.txt index 77049d797..031fd485e 100644 --- a/python/cuvs/cuvs/neighbors/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/CMakeLists.txt @@ -31,5 +31,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt index 44ec5a75f..61eda649c 100644 --- a/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/brute_force/CMakeLists.txt @@ -25,5 +25,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt index b2ad5d276..1f40daab2 100644 --- a/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/cagra/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt index 1c8e42e0b..a678852d9 100644 --- a/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/filters/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt index 5b0b39cb2..8351916e6 100644 --- a/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/hnsw/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt index 0d627dcf1..f5663cdaa 100644 --- a/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_flat/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() diff --git a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt index 8e528b6ad..a24320ded 100644 --- a/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt +++ b/python/cuvs/cuvs/neighbors/ivf_pq/CMakeLists.txt @@ -24,5 +24,5 @@ rapids_cython_create_modules( ) foreach(tgt IN LISTS RAPIDS_CYTHON_CREATED_TARGETS) - target_link_libraries(${tgt} PRIVATE rmm_logger) + target_link_libraries(${tgt} PRIVATE cuvs_rmm_logger) endforeach() From 2f9024064827d2d805024e1a42926f956995fa15 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 01:34:08 +0000 Subject: [PATCH 15/22] Also need for the C API. --- cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 441cdee8d..3c8ef69fd 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -697,7 +697,7 @@ target_compile_definitions(cuvs::cuvs INTERFACE $<$:NVTX_ENAB target_link_libraries( cuvs_c PUBLIC cuvs::cuvs ${CUVS_CTK_MATH_DEPENDENCIES} - PRIVATE raft::raft + PRIVATE raft::raft rmm::rmm_logger_impl ) # ensure CUDA symbols aren't relocated to the middle of the debug build binaries From f073f07e76c733b6ffac4c4669d02c01da2b8a72 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 02:42:04 +0000 Subject: [PATCH 16/22] Add linkage to C++ benchmarks built with Python build --- cpp/bench/ann/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/bench/ann/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 0f6b42ae9..46e2c79bb 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -129,6 +129,7 @@ function(ConfigureAnnBench) $<$:CUDA::cudart_static> $ $ + cuvs_bench_rmm_logger ) set_target_properties( @@ -174,6 +175,9 @@ function(ConfigureAnnBench) add_dependencies(CUVS_ANN_BENCH_ALL ${BENCH_NAME}) endfunction() +add_library(cuvs_bench_rmm_logger OBJECT) +target_link_libraries(cuvs_bench_rmm_logger PRIVATE rmm::rmm_logger_impl) + # ################################################################################################## # * Configure benchmark targets ------------------------------------------------------------- @@ -300,7 +304,7 @@ if(CUVS_ANN_BENCH_SINGLE_EXE) target_link_libraries( ANN_BENCH PRIVATE raft::raft nlohmann_json::nlohmann_json benchmark::benchmark dl fmt::fmt-header-only - spdlog::spdlog_header_only $<$:CUDA::nvtx3> + spdlog::spdlog_header_only $<$:CUDA::nvtx3> rmm::rmm_logger_impl ) set_target_properties( ANN_BENCH From a00a9acc73ad798f768d4f5e9f552c99dad2cacd Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 04:08:12 +0000 Subject: [PATCH 17/22] Only link to rmm if GPU-enabled --- cpp/bench/ann/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cpp/bench/ann/CMakeLists.txt b/cpp/bench/ann/CMakeLists.txt index 46e2c79bb..572b792a7 100644 --- a/cpp/bench/ann/CMakeLists.txt +++ b/cpp/bench/ann/CMakeLists.txt @@ -129,7 +129,7 @@ function(ConfigureAnnBench) $<$:CUDA::cudart_static> $ $ - cuvs_bench_rmm_logger + $ ) set_target_properties( @@ -175,8 +175,10 @@ function(ConfigureAnnBench) add_dependencies(CUVS_ANN_BENCH_ALL ${BENCH_NAME}) endfunction() -add_library(cuvs_bench_rmm_logger OBJECT) -target_link_libraries(cuvs_bench_rmm_logger PRIVATE rmm::rmm_logger_impl) +if(CUVS_FAISS_ENABLE_GPU) + add_library(cuvs_bench_rmm_logger OBJECT) + target_link_libraries(cuvs_bench_rmm_logger PRIVATE rmm::rmm_logger_impl) +endif() # ################################################################################################## # * Configure benchmark targets ------------------------------------------------------------- From 2a1071b3666a99c67081b62c01626e01dda16257 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 15:10:58 +0000 Subject: [PATCH 18/22] Preload OpenMP for TLS --- ci/test_wheel_cuvs.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/test_wheel_cuvs.sh b/ci/test_wheel_cuvs.sh index 7033003e9..6e46128a7 100755 --- a/ci/test_wheel_cuvs.sh +++ b/ci/test_wheel_cuvs.sh @@ -10,4 +10,10 @@ RAPIDS_PY_WHEEL_NAME="cuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/cuvs*.whl)[test] +# arm tests sporadically run into https://bugzilla.redhat.com/show_bug.cgi?id=1722181. +# This is a workaround to ensure that OpenMP gets the TLS that it needs. +if [[ "$(arch)" == "aarch64" ]]; then + export LD_PRELOAD=/opt/conda/envs/test/lib/libgomp.so.1 +fi + python -m pytest ./python/cuvs/cuvs/test From 66870b69728a7d36dca665dc64011d248c0db526 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 16:11:56 +0000 Subject: [PATCH 19/22] Find the library instead of assuming a path. --- ci/test_wheel_cuvs.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/test_wheel_cuvs.sh b/ci/test_wheel_cuvs.sh index 6e46128a7..e6870ec67 100755 --- a/ci/test_wheel_cuvs.sh +++ b/ci/test_wheel_cuvs.sh @@ -13,7 +13,13 @@ python -m pip install $(echo ./dist/cuvs*.whl)[test] # arm tests sporadically run into https://bugzilla.redhat.com/show_bug.cgi?id=1722181. # This is a workaround to ensure that OpenMP gets the TLS that it needs. if [[ "$(arch)" == "aarch64" ]]; then - export LD_PRELOAD=/opt/conda/envs/test/lib/libgomp.so.1 + for dir in $(ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | grep -o '=.*"' | sed 's/[="]//g'); do + lib="${dir}/libgomp.so.1" + if [[ -f "${lib}" ]]; then + export LD_PRELOAD="${lib}" + break + fi + done fi python -m pytest ./python/cuvs/cuvs/test From a80188a26027afa69721e7d9c422cd65fbbe28ab Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 16:39:09 +0000 Subject: [PATCH 20/22] Test print --- ci/test_wheel_cuvs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/test_wheel_cuvs.sh b/ci/test_wheel_cuvs.sh index e6870ec67..53ccee72c 100755 --- a/ci/test_wheel_cuvs.sh +++ b/ci/test_wheel_cuvs.sh @@ -16,6 +16,7 @@ if [[ "$(arch)" == "aarch64" ]]; then for dir in $(ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | grep -o '=.*"' | sed 's/[="]//g'); do lib="${dir}/libgomp.so.1" if [[ -f "${lib}" ]]; then + echo "Preloading "${lib}" to work around OpenMP TLS issue on aarch64" export LD_PRELOAD="${lib}" break fi From 3619d3cb90ee8a041cec14e906d57e9ea3a2c33d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 18:09:33 +0000 Subject: [PATCH 21/22] Import sklearn since the problem is the mangled, bundled openmp --- ci/test_wheel_cuvs.sh | 13 ------------- python/cuvs/cuvs/test/conftest.py | 4 ++++ 2 files changed, 4 insertions(+), 13 deletions(-) create mode 100644 python/cuvs/cuvs/test/conftest.py diff --git a/ci/test_wheel_cuvs.sh b/ci/test_wheel_cuvs.sh index 53ccee72c..7033003e9 100755 --- a/ci/test_wheel_cuvs.sh +++ b/ci/test_wheel_cuvs.sh @@ -10,17 +10,4 @@ RAPIDS_PY_WHEEL_NAME="cuvs_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/cuvs*.whl)[test] -# arm tests sporadically run into https://bugzilla.redhat.com/show_bug.cgi?id=1722181. -# This is a workaround to ensure that OpenMP gets the TLS that it needs. -if [[ "$(arch)" == "aarch64" ]]; then - for dir in $(ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | grep -o '=.*"' | sed 's/[="]//g'); do - lib="${dir}/libgomp.so.1" - if [[ -f "${lib}" ]]; then - echo "Preloading "${lib}" to work around OpenMP TLS issue on aarch64" - export LD_PRELOAD="${lib}" - break - fi - done -fi - python -m pytest ./python/cuvs/cuvs/test diff --git a/python/cuvs/cuvs/test/conftest.py b/python/cuvs/cuvs/test/conftest.py new file mode 100644 index 000000000..dadab9bad --- /dev/null +++ b/python/cuvs/cuvs/test/conftest.py @@ -0,0 +1,4 @@ +# arm tests sporadically run into https://bugzilla.redhat.com/show_bug.cgi?id=1722181. +# This is a workaround to ensure that OpenMP gets the TLS that it needs. + +import sklearn From 5a2d8711d26832756840dc36bb5ff66baa7fa2f6 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Thu, 28 Nov 2024 18:17:59 +0000 Subject: [PATCH 22/22] Fix style --- python/cuvs/cuvs/test/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/cuvs/cuvs/test/conftest.py b/python/cuvs/cuvs/test/conftest.py index dadab9bad..d84de5d21 100644 --- a/python/cuvs/cuvs/test/conftest.py +++ b/python/cuvs/cuvs/test/conftest.py @@ -1,4 +1,5 @@ -# arm tests sporadically run into https://bugzilla.redhat.com/show_bug.cgi?id=1722181. +# arm tests sporadically run into +# https://bugzilla.redhat.com/show_bug.cgi?id=1722181. # This is a workaround to ensure that OpenMP gets the TLS that it needs. -import sklearn +import sklearn # noqa: F401