From 37a8fb8633540fbf4b6565304580ac17e51949bf Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 10 May 2024 19:13:18 +0000 Subject: [PATCH 1/3] hide RAFT #pragma deprecation warnings --- cpp/cmake/modules/ConfigureCUDA.cmake | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/cpp/cmake/modules/ConfigureCUDA.cmake b/cpp/cmake/modules/ConfigureCUDA.cmake index ea8a077b0c..35f0bb3cae 100644 --- a/cpp/cmake/modules/ConfigureCUDA.cmake +++ b/cpp/cmake/modules/ConfigureCUDA.cmake @@ -13,45 +13,45 @@ # ============================================================================= if(DISABLE_DEPRECATION_WARNINGS) - list(APPEND RAFT_CXX_FLAGS -Wno-deprecated-declarations) - list(APPEND RAFT_CUDA_FLAGS -Xcompiler=-Wno-deprecated-declarations) + list(APPEND CUVS_CXX_FLAGS -Wno-deprecated-declarations -DRAFT_HIDE_DEPRECATION_WARNINGS) + list(APPEND CUVS_CUDA_FLAGS -Xcompiler=-Wno-deprecated-declarations -DRAFT_HIDE_DEPRECATION_WARNINGS) endif() # Be very strict when compiling with GCC as host compiler (and thus more lenient when compiling with # clang) if(CMAKE_COMPILER_IS_GNUCXX) - list(APPEND RAFT_CXX_FLAGS -Wall -Werror -Wno-unknown-pragmas -Wno-error=deprecated-declarations) - list(APPEND RAFT_CUDA_FLAGS -Xcompiler=-Wall,-Werror,-Wno-error=deprecated-declarations) + list(APPEND CUVS_CXX_FLAGS -Wall -Werror -Wno-unknown-pragmas -Wno-error=deprecated-declarations) + list(APPEND CUVS_CUDA_FLAGS -Xcompiler=-Wall,-Werror,-Wno-error=deprecated-declarations) # set warnings as errors if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11.2.0) - list(APPEND RAFT_CUDA_FLAGS -Werror=all-warnings) + list(APPEND CUVS_CUDA_FLAGS -Werror=all-warnings) endif() endif() if(CUDA_LOG_COMPILE_TIME) - list(APPEND RAFT_CUDA_FLAGS "--time=nvcc_compile_log.csv") + list(APPEND CUVS_CUDA_FLAGS "--time=nvcc_compile_log.csv") endif() -list(APPEND RAFT_CUDA_FLAGS --expt-extended-lambda --expt-relaxed-constexpr) -list(APPEND RAFT_CXX_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") -list(APPEND RAFT_CUDA_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") +list(APPEND CUVS_CUDA_FLAGS --expt-extended-lambda --expt-relaxed-constexpr) +list(APPEND CUVS_CXX_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") +list(APPEND CUVS_CUDA_FLAGS "-DCUDA_API_PER_THREAD_DEFAULT_STREAM") # make sure we produce smallest binary size -list(APPEND RAFT_CUDA_FLAGS -Xfatbin=-compress-all) +list(APPEND CUVS_CUDA_FLAGS -Xfatbin=-compress-all) # Option to enable line info in CUDA device compilation to allow introspection when profiling / # memchecking if(CUDA_ENABLE_LINEINFO) - list(APPEND RAFT_CUDA_FLAGS -lineinfo) + list(APPEND CUVS_CUDA_FLAGS -lineinfo) endif() if(OpenMP_FOUND) - list(APPEND RAFT_CUDA_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS}) + list(APPEND CUVS_CUDA_FLAGS -Xcompiler=${OpenMP_CXX_FLAGS}) endif() # Debug options if(CMAKE_BUILD_TYPE MATCHES Debug) message(VERBOSE "RAFT: Building with debugging flags") - list(APPEND RAFT_CUDA_FLAGS -G -Xcompiler=-rdynamic) - list(APPEND RAFT_CUDA_FLAGS -Xptxas --suppress-stack-size-warning) + list(APPEND CUVS_CUDA_FLAGS -G -Xcompiler=-rdynamic) + list(APPEND CUVS_CUDA_FLAGS -Xptxas --suppress-stack-size-warning) endif() From c0ff9ac446c0d5c844f76dde1b2adbeb501ed7ff Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 13 May 2024 19:17:15 +0000 Subject: [PATCH 2/3] fix reorder warning turned into an error --- cpp/src/neighbors/ivf_pq_index.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/src/neighbors/ivf_pq_index.cpp b/cpp/src/neighbors/ivf_pq_index.cpp index 1e19198671..fcb2c976dd 100644 --- a/cpp/src/neighbors/ivf_pq_index.cpp +++ b/cpp/src/neighbors/ivf_pq_index.cpp @@ -47,13 +47,13 @@ index::index(raft::resources const& handle, pq_bits_(pq_bits), pq_dim_(pq_dim == 0 ? calculate_pq_dim(dim) : pq_dim), conservative_memory_allocation_(conservative_memory_allocation), - pq_centers_{raft::make_device_mdarray(handle, make_pq_centers_extents())}, lists_{n_lists}, - rotation_matrix_{ - raft::make_device_matrix(handle, this->rot_dim(), this->dim())}, list_sizes_{raft::make_device_vector(handle, n_lists)}, + pq_centers_{raft::make_device_mdarray(handle, make_pq_centers_extents())}, centers_{raft::make_device_matrix(handle, n_lists, this->dim_ext())}, centers_rot_{raft::make_device_matrix(handle, n_lists, this->rot_dim())}, + rotation_matrix_{ + raft::make_device_matrix(handle, this->rot_dim(), this->dim())}, data_ptrs_{raft::make_device_vector(handle, n_lists)}, inds_ptrs_{raft::make_device_vector(handle, n_lists)}, accum_sorted_sizes_{raft::make_host_vector(n_lists + 1)} From 3993f02ce08952e166d151e5bcbc86fff077d825 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Mon, 13 May 2024 22:50:34 +0000 Subject: [PATCH 3/3] fix unused-but-set-variable warning as error --- cpp/test/neighbors/ann_ivf_pq.cuh | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/test/neighbors/ann_ivf_pq.cuh b/cpp/test/neighbors/ann_ivf_pq.cuh index d5fc0d0b72..71d15e6a2c 100644 --- a/cpp/test/neighbors/ann_ivf_pq.cuh +++ b/cpp/test/neighbors/ann_ivf_pq.cuh @@ -354,7 +354,6 @@ class ivf_pq_test : public ::testing::TestWithParam { cuvs::Compare{})); // Another test with the API that take list_data directly - auto list_data = index->lists()[label]->data.view(); uint32_t n_take = 4; ASSERT_TRUE(row_offset + n_take < n_rows); auto codes2 = raft::make_device_matrix(handle_, n_take, index->pq_dim());