Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward-merge branch-24.04 into branch-24.06 [skip ci] #2229

Merged
merged 8 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ repos:
verbose: true
require_serial: true
exclude: .*/thirdparty/.*
- id: copyright-check
name: copyright-check
entry: python ./ci/checks/copyright.py --git-modified-only --update-current-year
language: python
pass_filenames: false
additional_dependencies: [gitpython]
- id: include-check
name: include-check
entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/test
Expand All @@ -109,6 +103,23 @@ repos:
rev: v4.5.0
hooks:
- id: check-json
- repo: https://github.com/rapidsai/pre-commit-hooks
rev: v0.0.1
hooks:
- id: verify-copyright
files: |
(?x)
[.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx)$|
CMakeLists[.]txt$|
CMakeLists_standalone[.]txt$|
meta[.]yaml$|
setup[.]cfg$
exclude: |
(?x)
cpp/include/raft/neighbors/detail/faiss_select/|
cpp/include/raft/thirdparty/|
docs/source/sphinxext/github_link[.]py|
cpp/cmake/modules/FindAVX[.]cmake

default_language_version:
python: python3
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ if hasArg --allgpuarch; then
BUILD_ALL_GPU_ARCH=1
fi

if hasArg --compile-lib || (( ${NUMARGS} == 0 )); then
if hasArg --compile-lib || hasArg pylibraft || (( ${NUMARGS} == 0 )); then
COMPILE_LIBRARY=ON
CMAKE_TARGET="${CMAKE_TARGET};raft_lib"
fi
Expand Down Expand Up @@ -405,7 +405,7 @@ fi

################################################################################
# Configure for building all C++ targets
if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || hasArg bench-prims || hasArg bench-ann; then
if (( ${NUMARGS} == 0 )) || hasArg libraft || hasArg docs || hasArg tests || hasArg bench-prims || hasArg bench-ann || ((${COMPILE_LIBRARY} == ON )); then
if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
RAFT_CMAKE_CUDA_ARCHITECTURES="NATIVE"
echo "Building for the architecture of the GPU in the system..."
Expand Down
290 changes: 0 additions & 290 deletions ci/checks/copyright.py

This file was deleted.

4 changes: 2 additions & 2 deletions conda/recipes/libraft/build_libraft_template.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

# Just building template so we verify it uses libraft.so and fail if it doesn't build
./build.sh template
./build.sh template --no-nvtx
8 changes: 8 additions & 0 deletions cpp/bench/prims/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ if(BUILD_PRIMS_BENCH)
bench/prims/neighbors/knn/ivf_pq_filter_float_int64_t.cu
bench/prims/neighbors/knn/ivf_pq_int8_t_int64_t.cu
bench/prims/neighbors/knn/ivf_pq_uint8_t_int64_t.cu
src/neighbors/detail/ivf_pq_search_filtering_float_int64_t.cu
src/neighbors/detail/ivf_pq_compute_similarity_float_float_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_float_fp8_false_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_float_fp8_true_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_float_half_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_half_fp8_false_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_half_fp8_true_bitset64.cu
src/neighbors/detail/ivf_pq_compute_similarity_half_half_bitset64.cu
bench/prims/neighbors/refine_float_int64_t.cu
bench/prims/neighbors/refine_uint8_t_int64_t.cu
bench/prims/main.cpp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,9 +14,10 @@
* limitations under the License.
*/

#undef RAFT_EXPLICIT_INSTANTIATE_ONLY // Enable instantiation of search with filter
#include "../knn.cuh"

#include <raft_internal/neighbors/ivf_pq_compute_similarity_filters_test-ext.cuh>
#include <raft_internal/neighbors/ivf_pq_search_test-ext.cuh>
namespace raft::bench::spatial {

KNN_REGISTER(float, int64_t, ivf_pq_filter_knn, kInputsFilter, kNoCopyOnly, kScopeFull);
Expand Down
3 changes: 2 additions & 1 deletion cpp/include/raft/core/detail/mdspan_numpy_serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ inline dtype_t get_numpy_dtype()
}

#if defined(_RAFT_HAS_CUDA)
template <typename T, typename std::enable_if_t<std::is_same_v<T, half>, bool> = true>
template <typename T,
typename std::enable_if_t<std::is_same_v<std::remove_cv_t<T>, half>, bool> = true>
inline dtype_t get_numpy_dtype()
{
return {RAFT_NUMPY_HOST_ENDIAN_CHAR, 'e', sizeof(T)};
Expand Down
Loading
Loading