Skip to content

Commit

Permalink
Merge branch 'branch-24.10' into fix/run_pylibraft-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Sep 26, 2024
2 parents 8c5850e + 0f8b097 commit ced1555
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 40 deletions.
6 changes: 3 additions & 3 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR}
NEXT_UCXX_SHORT_TAG="$(curl -sL https://version.gpuci.io/rapids/${NEXT_SHORT_TAG})"

# Need to distutils-normalize the original version
NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))")
NEXT_UCXX_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_UCXX_SHORT_TAG}'))")
NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))")
NEXT_UCXX_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_UCXX_SHORT_TAG}'))")

echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG"

Expand Down Expand Up @@ -58,7 +58,7 @@ for FILE in dependencies.yaml conda/environments/*.yaml; do
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}"
done
for DEP in "${UCXX_DEPENDENCIES[@]}"; do
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_UCXX_SHORT_TAG_PEP440}.*/,>=0.0.0a0/g" "${FILE}"
sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_UCXX_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}"
done
done
for FILE in python/*/pyproject.toml; do
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/libraft/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ cuda11_cuda_profiler_api_run_version:
- ">=11.4.240,<12"

spdlog_version:
- ">=1.12.0,<1.13"
- ">=1.14.1,<1.15"

fmt_version:
- ">=10.1.1,<11"
- ">=11.0.2,<12"
4 changes: 2 additions & 2 deletions conda/recipes/raft-ann-bench-cpu/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ nlohmann_json_version:
- ">=3.11.2"

spdlog_version:
- ">=1.12.0,<1.13"
- ">=1.14.1,<1.15"

fmt_version:
- ">=10.1.1,<11"
- ">=11.0.2,<12"
11 changes: 1 addition & 10 deletions cpp/cmake/thirdparty/get_spdlog.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Copyright (c) 2021-2023, NVIDIA CORPORATION.
# Copyright (c) 2021-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. You may obtain a copy of the License at
Expand All @@ -19,15 +19,6 @@ function(find_and_configure_spdlog)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET rmm-exports)
rapids_export_package(BUILD spdlog rmm-exports)

if(spdlog_ADDED)
rapids_export(
BUILD spdlog
EXPORT_SET spdlog
GLOBAL_TARGETS spdlog spdlog_header_only
NAMESPACE spdlog::)
include("${rapids-cmake-dir}/export/find_package_root.cmake")
rapids_export_find_package_root(BUILD spdlog [=[${CMAKE_CURRENT_LIST_DIR}]=] EXPORT_SET rmm-exports)
endif()
endfunction()

find_and_configure_spdlog()
31 changes: 17 additions & 14 deletions cpp/include/raft/linalg/detail/eig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,19 @@ void eigDC(raft::resources const& handle,
return;
#endif

#if CUDART_VERSION <= 12040
// Use a new stream instead of `cudaStreamPerThread` to avoid cusolver bug # 4580093.
int cudart_version = 0;
RAFT_CUDA_TRY(cudaRuntimeGetVersion(&cudart_version));
cudaStream_t stream_new;
cudaEvent_t sync_event = resource::detail::get_cuda_stream_sync_event(handle);
rmm::cuda_stream stream_new_wrapper;
cudaStream_t stream_new = stream_new_wrapper.value();
cudaEvent_t sync_event = resource::detail::get_cuda_stream_sync_event(handle);
RAFT_CUDA_TRY(cudaEventRecord(sync_event, stream));
RAFT_CUDA_TRY(cudaStreamWaitEvent(stream_new, sync_event));
#else
cudaStream_t stream_new = stream;
#endif
if (cudart_version < 12050) {
// Use a new stream instead of `cudaStreamPerThread` to avoid cusolver bug # 4580093.
stream_new = stream_new_wrapper.value();
RAFT_CUDA_TRY(cudaEventRecord(sync_event, stream));
RAFT_CUDA_TRY(cudaStreamWaitEvent(stream_new, sync_event));
} else {
stream_new = stream;
}
cusolverDnHandle_t cusolverH = resource::get_cusolver_dn_handle(handle);

cusolverDnParams_t dn_params = nullptr;
Expand Down Expand Up @@ -152,11 +155,11 @@ void eigDC(raft::resources const& handle,
"eig.cuh: eigensolver couldn't converge to a solution. "
"This usually occurs when some of the features do not vary enough.");

#if CUDART_VERSION <= 12040
// Synchronize the created stream with the original stream before return
RAFT_CUDA_TRY(cudaEventRecord(sync_event, stream_new));
RAFT_CUDA_TRY(cudaStreamWaitEvent(stream, sync_event));
#endif
if (cudart_version < 12050) {
// Synchronize the created stream with the original stream before return
RAFT_CUDA_TRY(cudaEventRecord(sync_event, stream_new));
RAFT_CUDA_TRY(cudaStreamWaitEvent(stream, sync_event));
}
}

enum EigVecMemUsage { OVERWRITE_INPUT, COPY_INPUT };
Expand Down
4 changes: 3 additions & 1 deletion cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,9 @@ if(BUILD_TESTS)
neighbors/ann_nn_descent/test_float_uint32_t.cu
neighbors/ann_nn_descent/test_int8_t_uint32_t.cu
neighbors/ann_nn_descent/test_uint8_t_uint32_t.cu
neighbors/ann_nn_descent/test_batch_float_uint32_t.cu
# TODO: Investigate why this test is failing Reference issue
# https://github.com/rapidsai/raft/issues/2450
# neighbors/ann_nn_descent/test_batch_float_uint32_t.cu
LIB
EXPLICIT_INSTANTIATE_ONLY
GPUS
Expand Down
18 changes: 10 additions & 8 deletions cpp/test/neighbors/ann_nn_descent.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,15 @@ const std::vector<AnnNNDescentInputs> inputs = raft::util::itertools::product<An
{false, true},
{0.90});

const std::vector<AnnNNDescentBatchInputs> inputsBatch =
raft::util::itertools::product<AnnNNDescentBatchInputs>(
{std::make_pair(0.9, 3lu), std::make_pair(0.9, 2lu)}, // min_recall, n_clusters
{4000, 5000}, // n_rows
{192, 512}, // dim
{32, 64}, // graph_degree
{raft::distance::DistanceType::L2Expanded},
{false, true});
// TODO: Investigate why this test is failing
// Reference issue https://github.com/rapidsai/raft/issues/2450
// const std::vector<AnnNNDescentBatchInputs> inputsBatch =
// raft::util::itertools::product<AnnNNDescentBatchInputs>(
// {std::make_pair(0.9, 3lu), std::make_pair(0.9, 2lu)}, // min_recall, n_clusters
// {4000, 5000}, // n_rows
// {192, 512}, // dim
// {32, 64}, // graph_degree
// {raft::distance::DistanceType::L2Expanded},
// {false, true});

} // namespace raft::neighbors::experimental::nn_descent
5 changes: 5 additions & 0 deletions python/pylibraft/pylibraft/test/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native

1 change: 1 addition & 0 deletions python/raft-dask/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ markers =
nccl: marks a test as using NCCL
ucx: marks a test as using UCX-Py
ucxx: marks a test as using UCXX
addopts = --tb=native
5 changes: 5 additions & 0 deletions python/raft-dask/raft_dask/test/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

[pytest]
addopts = --tb=native

0 comments on commit ced1555

Please sign in to comment.