Skip to content

Commit

Permalink
Merge branch 'branch-24.12' into fea/warn_when_override_has_inccorect…
Browse files Browse the repository at this point in the history
…_case
  • Loading branch information
robertmaynard authored Nov 4, 2024
2 parents 6d9db79 + 03ec7ef commit c89532e
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 10 deletions.
4 changes: 2 additions & 2 deletions rapids-cmake/cpm/cccl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ function(rapids_cpm_cccl)
if(CCCL_SOURCE_DIR AND to_install AND NOT rapids_cccl_install_rules_already_called)

set_property(GLOBAL PROPERTY rapids_cmake_cccl_install_rules ON)
# CCCL < 2.7 does not currently correctly support installation of cub/thrust/libcudacxx in a
# CCCL < 2.8 does not currently correctly support installation of cub/thrust/libcudacxx in a
# subdirectory
if(version VERSION_LESS 2.7)
if(version VERSION_LESS 2.8)
set(Thrust_SOURCE_DIR "${CCCL_SOURCE_DIR}/thrust")
set(CUB_SOURCE_DIR "${CCCL_SOURCE_DIR}/cub")
set(libcudacxx_SOURCE_DIR "${CCCL_SOURCE_DIR}/libcudacxx")
Expand Down
10 changes: 5 additions & 5 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@
"git_tag": "555d628e9b250868c9da003e4407087ff1982e8e"
},
"nvcomp": {
"version": "4.0.1",
"version": "4.1.0.6",
"git_url": "https://github.com/NVIDIA/nvcomp.git",
"git_tag": "v2.2.0",
"proprietary_binary_cuda_version_mapping": {
"11": "11.x",
"12": "12.x"
"11": "11",
"12": "12"
},
"proprietary_binary": {
"x86_64-linux": "https://developer.download.nvidia.com/compute/nvcomp/${version}/local_installers/nvcomp-linux-x86_64-${version}-cuda${cuda-toolkit-version-mapping}.tar.gz",
"aarch64-linux": "https://developer.download.nvidia.com/compute/nvcomp/${version}/local_installers/nvcomp-linux-sbsa-${version}-cuda${cuda-toolkit-version-mapping}.tar.gz"
"x86_64-linux": "https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-${version}_cuda${cuda-toolkit-version-mapping}-archive.tar.xz",
"aarch64-linux": "https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-${version}_cuda${cuda-toolkit-version-mapping}-archive.tar.xz"
}
},
"nvtx3": {
Expand Down
1 change: 1 addition & 0 deletions testing/cpm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ add_cmake_config_test( cpm_cccl-simple.cmake )
add_cmake_config_test( cpm_cccl-export.cmake )
add_cmake_build_test( cpm_cccl-version-2-5.cmake )
add_cmake_build_test( cpm_cccl-version-2-7.cmake )
add_cmake_build_test( cpm_cccl-version-2-8.cmake )
add_cmake_build_test( cpm_cccl-preserve-custom-install-loc )

add_cmake_config_test( cpm_cuco-simple.cmake )
Expand Down
2 changes: 1 addition & 1 deletion testing/cpm/cpm_cccl-version-2-5.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json
"git_shallow": false,
"git_url": "https://github.com/NVIDIA/cccl.git",
"git_tag": "e21d607157218540cd7c45461213fb96adf720b7"
},
}
}
}
]=])
Expand Down
3 changes: 1 addition & 2 deletions testing/cpm/cpm_cccl-version-2-7.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json
"version": "2.7.0",
"git_shallow": false,
"git_url": "https://github.com/NVIDIA/cccl.git",
"git_tag": "e5229f2c7509ced5a830be4ae884d9e1639e8951"
"git_tag": "v2.7.0-rc2"
}
}
}
Expand Down Expand Up @@ -74,7 +74,6 @@ foreach(to_verify IN LISTS include_dirs_to_verify cmake_dirs_to_verify)
endforeach()
]=])


add_custom_target(verify_thrust_header_search ALL
COMMAND ${CMAKE_COMMAND} -E rm -rf "${CMAKE_BINARY_DIR}/check_cccl/build"
COMMAND ${CMAKE_COMMAND} -S="${CMAKE_BINARY_DIR}/check_cccl" -B="${CMAKE_BINARY_DIR}/install/build"
Expand Down
82 changes: 82 additions & 0 deletions testing/cpm/cpm_cccl-version-2-8.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#=============================================================================
# Copyright (c) 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
include(${rapids-cmake-dir}/cpm/cccl.cmake)
include(${rapids-cmake-dir}/cpm/init.cmake)
include(${rapids-cmake-dir}/cpm/package_override.cmake)

include(GNUInstallDirs)
set(CMAKE_INSTALL_LIBDIR "lib")
set(CMAKE_INSTALL_INCLUDEDIR "include")

rapids_cpm_init()

# Need to write out an override file
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/override.json
[=[
{
"packages": {
"CCCL": {
"version": "2.8.0",
"git_shallow": false,
"git_url": "https://github.com/NVIDIA/cccl.git",
"git_tag": "fb4453dd632194dd2736772a9a0c19d200855ad7"
}
}
}
]=])

rapids_cpm_package_override(${CMAKE_CURRENT_BINARY_DIR}/override.json)

rapids_cpm_cccl(INSTALL_EXPORT_SET export_set)

# Install our project so we can verify `cccl`/`thrust` has preserved
# the correct install location
add_custom_target(install_project ALL
COMMAND ${CMAKE_COMMAND} --install "${CMAKE_BINARY_DIR}" --prefix check_cccl/install/
)

# Add a custom command that verifies that the expect files have
# been installed for each component
file(WRITE "${CMAKE_BINARY_DIR}/check_cccl/CMakeLists.txt" [=[
cmake_minimum_required(VERSION 3.20)
project(verify_install_targets LANGUAGES CXX)

# Verify include dirs
set(include_dirs_to_verify include/rapids/cub
include/rapids/libcudacxx/cuda
include/rapids/libcudacxx/nv
include/rapids/thrust)

# Verify lib/cmake dirs
set(cmake_dirs_to_verify lib/rapids/cmake/cccl
lib/rapids/cmake/cub
lib/rapids/cmake/libcudacxx
lib/rapids/cmake/thrust)

foreach(to_verify IN LISTS include_dirs_to_verify cmake_dirs_to_verify)
set(path "${CMAKE_CURRENT_SOURCE_DIR}/install/${to_verify}")
if(NOT EXISTS ${path})
message(FATAL_ERROR "Failed to find `${path}` location")
endif()
endforeach()
]=])


add_custom_target(verify_thrust_header_search ALL
COMMAND ${CMAKE_COMMAND} -E rm -rf "${CMAKE_BINARY_DIR}/check_cccl/build"
COMMAND ${CMAKE_COMMAND} -S="${CMAKE_BINARY_DIR}/check_cccl" -B="${CMAKE_BINARY_DIR}/install/build"
)
add_dependencies(verify_thrust_header_search install_project)

0 comments on commit c89532e

Please sign in to comment.