Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/branch-25.02' into cccl-2.7.0-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Dec 3, 2024
2 parents b6c465b + 0e6d35f commit db2768c
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/copy-pr-bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/

enabled: true
auto_sync_draft: false
26 changes: 26 additions & 0 deletions .github/workflows/trigger-breaking-change-alert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Trigger Breaking Change Notifications

on:
pull_request_target:
types:
- closed
- reopened
- labeled
- unlabeled

jobs:
trigger-notifier:
if: contains(github.event.pull_request.labels.*.name, 'breaking')
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
with:
sender_login: ${{ github.event.sender.login }}
sender_avatar: ${{ github.event.sender.avatar_url }}
repo: ${{ github.repository }}
pr_number: ${{ github.event.pull_request.number }}
pr_title: "${{ github.event.pull_request.title }}"
pr_body: "${{ github.event.pull_request.body || '_Empty PR description_' }}"
pr_base_ref: ${{ github.event.pull_request.base.ref }}
pr_author: ${{ github.event.pull_request.user.login }}
event_action: ${{ github.event.action }}
pr_merged: ${{ github.event.pull_request.merged }}
2 changes: 1 addition & 1 deletion ci/build_wheel_pylibraft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ esac
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF${EXTRA_CMAKE_ARGS}"

ci/build_wheel.sh pylibraft ${package_dir}
ci/validate_wheel.sh ${package_dir} final_dist
ci/validate_wheel.sh ${package_dir} final_dist pylibraft
2 changes: 1 addition & 1 deletion ci/build_wheel_raft_dask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ package_dir="python/raft-dask"
export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF"

ci/build_wheel.sh raft-dask ${package_dir}
ci/validate_wheel.sh ${package_dir} final_dist
ci/validate_wheel.sh ${package_dir} final_dist raft-dask
24 changes: 24 additions & 0 deletions ci/validate_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,37 @@ set -euo pipefail

package_dir=$1
wheel_dir_relative_path=$2
package_name=$3

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"

# some packages are much larger on CUDA 11 than on CUDA 12
if [[ "${package_name}" == "raft-dask" ]]; then
PYDISTCHECK_ARGS=(
--max-allowed-size-compressed '200M'
)
elif [[ "${package_name}" == "pylibraft" ]]; then
if [[ "${RAPIDS_CUDA_MAJOR}" == "11" ]]; then
PYDISTCHECK_ARGS=(
--max-allowed-size-compressed '600M'
)
else
PYDISTCHECK_ARGS=(
--max-allowed-size-compressed '100M'
)
fi
else
echo "Unsupported package name: ${package_name}"
exit 1
fi

cd "${package_dir}"

rapids-logger "validate packages with 'pydistcheck'"

pydistcheck \
--inspect \
"${PYDISTCHECK_ARGS[@]}" \
"$(echo ${wheel_dir_relative_path}/*.whl)"

rapids-logger "validate packages with 'twine'"
Expand Down
13 changes: 10 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ target_include_directories(
)

# Keep RAFT as lightweight as possible. Only CUDA libs and rmm should be used in global target.
target_link_libraries(raft INTERFACE rmm::rmm cuco::cuco nvidia::cutlass::cutlass CCCL::CCCL)
target_link_libraries(
raft INTERFACE rmm::rmm rmm::rmm_logger spdlog::spdlog_header_only cuco::cuco
nvidia::cutlass::cutlass CCCL::CCCL
)

target_compile_features(raft INTERFACE cxx_std_17 $<BUILD_INTERFACE:cuda_std_17>)
target_compile_options(
Expand Down Expand Up @@ -288,8 +291,10 @@ if(RAFT_COMPILE_LIBRARY)
"$<$<COMPILE_LANGUAGE:CUDA>:${RAFT_CUDA_FLAGS}>"
)

add_library(raft_lib SHARED $<TARGET_OBJECTS:raft_objs>)
add_library(raft_lib_static STATIC $<TARGET_OBJECTS:raft_objs>)
# Make sure not to add the rmm logger twice since it will be brought in as an interface source by
# the rmm::rmm_logger_impl target.
add_library(raft_lib SHARED $<FILTER:$<TARGET_OBJECTS:raft_objs>,EXCLUDE,rmm.*logger>)
add_library(raft_lib_static STATIC $<FILTER:$<TARGET_OBJECTS:raft_objs>,EXCLUDE,rmm.*logger>)

set_target_properties(
raft_lib raft_lib_static
Expand All @@ -313,6 +318,8 @@ if(RAFT_COMPILE_LIBRARY)
# ensure CUDA symbols aren't relocated to the middle of the debug build binaries
target_link_options(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/fatbin.ld")
endforeach()
target_link_libraries(raft_lib PRIVATE rmm::rmm_logger_impl)
target_link_libraries(raft_lib_static PRIVATE rmm::rmm_logger_impl)
endif()

if(TARGET raft_lib AND (NOT TARGET raft::raft_lib))
Expand Down
4 changes: 4 additions & 0 deletions cpp/bench/prims/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function(ConfigureBench)
PRIVATE raft::raft
raft_internal
$<$<BOOL:${ConfigureBench_LIB}>:raft::compiled>
$<$<NOT:$<BOOL:${ConfigureBench_LIB}>>:bench_rmm_logger>
${RAFT_CTK_MATH_DEPENDENCIES}
benchmark::benchmark
Threads::Threads
Expand Down Expand Up @@ -73,6 +74,9 @@ function(ConfigureBench)

endfunction()

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

if(BUILD_PRIMS_BENCH)
ConfigureBench(NAME CORE_BENCH PATH core/bitset.cu core/copy.cu main.cpp)

Expand Down
6 changes: 3 additions & 3 deletions cpp/cmake/thirdparty/get_spdlog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
function(find_and_configure_spdlog)

include(${rapids-cmake-dir}/cpm/spdlog.cmake)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET rmm-exports)
rapids_export_package(BUILD spdlog rmm-exports)
rapids_cpm_spdlog(FMT_OPTION "EXTERNAL_FMT_HO" INSTALL_EXPORT_SET raft-exports)
rapids_export_package(BUILD spdlog raft-exports)

endfunction()

find_and_configure_spdlog()
find_and_configure_spdlog()
2 changes: 1 addition & 1 deletion cpp/include/raft/core/device_mdspan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ auto constexpr make_device_strided_matrix_view(ElementType* ptr,
constexpr auto is_row_major = std::is_same_v<LayoutPolicy, layout_c_contiguous>;
constexpr auto is_col_major = std::is_same_v<LayoutPolicy, layout_f_contiguous>;

assert(is_row_major || is_col_major);
static_assert(is_row_major || is_col_major, "Unsupported layout policy for strided matrix view");

IndexType stride0 = is_row_major ? (stride > 0 ? stride : n_cols) : 1;
IndexType stride1 = is_row_major ? 1 : (stride > 0 ? stride : n_rows);
Expand Down
4 changes: 1 addition & 3 deletions python/pylibraft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@ matrix-entry = "cuda_suffixed=true;use_cuda_wheels=true"

[tool.pydistcheck]
select = [
# NOTE: size threshold is managed via CLI args in CI scripts
"distro-too-large-compressed",
]

# detect when package size grows significantly
max_allowed_size_compressed = '825M'

[tool.pytest.ini_options]
filterwarnings = [
"error",
Expand Down

0 comments on commit db2768c

Please sign in to comment.