diff --git a/rapids-cmake/cpm/patches/cccl/revert_pr_211.diff b/rapids-cmake/cpm/patches/cccl/revert_pr_211.diff deleted file mode 100644 index 27ff1674..00000000 --- a/rapids-cmake/cpm/patches/cccl/revert_pr_211.diff +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h b/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h -index 046eb83c0..8047c9701 100644 ---- a/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h -+++ b/thrust/thrust/system/cuda/detail/internal/copy_device_to_device.h -@@ -53,41 +53,15 @@ namespace cuda_cub - - namespace __copy - { --template --OutputIt THRUST_RUNTIME_FUNCTION device_to_device( -- execution_policy& policy, InputIt first, InputIt last, OutputIt result, thrust::detail::true_type) --{ -- typedef typename thrust::iterator_traits::value_type InputTy; -- const auto n = thrust::distance(first, last); -- if (n > 0) -- { -- cudaError status; -- status = trivial_copy_device_to_device( -- policy, -- reinterpret_cast(thrust::raw_pointer_cast(&*result)), -- reinterpret_cast(thrust::raw_pointer_cast(&*first)), -- n); -- cuda_cub::throw_on_error(status, "__copy:: D->D: failed"); -- } -- -- return result + n; --} - - template - OutputIt THRUST_RUNTIME_FUNCTION device_to_device( -- execution_policy& policy, InputIt first, InputIt last, OutputIt result, thrust::detail::false_type) -+ execution_policy& policy, InputIt first, InputIt last, OutputIt result) - { - typedef typename thrust::iterator_traits::value_type InputTy; - return cuda_cub::transform(policy, first, last, result, thrust::identity()); - } - --template --OutputIt THRUST_RUNTIME_FUNCTION --device_to_device(execution_policy& policy, InputIt first, InputIt last, OutputIt result) --{ -- return device_to_device( -- policy, first, last, result, typename is_indirectly_trivially_relocatable_to::type()); --} - } // namespace __copy - - } // namespace cuda_cub diff --git a/rapids-cmake/cpm/versions.json b/rapids-cmake/cpm/versions.json index 5616dbc6..88768247 100644 --- a/rapids-cmake/cpm/versions.json +++ b/rapids-cmake/cpm/versions.json @@ -9,14 +9,7 @@ "version": "2.5.0", "git_shallow": false, "git_url": "https://github.com/NVIDIA/cccl.git", - "git_tag": "e21d607157218540cd7c45461213fb96adf720b7", - "patches": [ - { - "file": "cccl/revert_pr_211.diff", - "issue": "thrust::copy introduced a change in behavior that causes failures with cudaErrorInvalidValue.", - "fixed_in": "" - } - ] + "git_tag": "e21d607157218540cd7c45461213fb96adf720b7" }, "cuco": { "version": "0.0.1", diff --git a/testing/cpm/cpm_find-patch-command/CMakeLists.txt b/testing/cpm/cpm_find-patch-command/CMakeLists.txt index b99df9e6..041641a4 100644 --- a/testing/cpm/cpm_find-patch-command/CMakeLists.txt +++ b/testing/cpm/cpm_find-patch-command/CMakeLists.txt @@ -32,19 +32,33 @@ set(cccl_dir "${deps_dir}/cccl") list(APPEND CMAKE_PREFIX_PATH "${cccl_dir}") include(${rapids-cmake-dir}/cpm/init.cmake) -include(${rapids-cmake-dir}/cpm/cccl.cmake) rapids_cpm_init() + +include(${rapids-cmake-dir}/cpm/package_override.cmake) +rapids_cpm_package_override(${CMAKE_CURRENT_SOURCE_DIR}/override.json) + +include(${rapids-cmake-dir}/cpm/cccl.cmake) rapids_cpm_cccl() if(NOT "${CCCL_ADDED}") message(FATAL_ERROR "The found repo was used rather than downloading and patching a new version") endif() +# Verify that the two files that we inserted into the CCCL source tree exist +# Which proves the patches in the override are properly applied +if(NOT EXISTS "${CCCL_SOURCE_DIR}/git_file_1.txt") + message(FATAL_ERROR "failed to apply CCCL first patch") +endif() + +if(NOT EXISTS "${CCCL_SOURCE_DIR}/git_file_2.txt") + message(FATAL_ERROR "failed to apply CCCL second patch") +endif() + execute_process( - COMMAND ${GIT_EXECUTABLE} diff-files --quiet - RESULT_VARIABLE REPO_IS_DIRTY + COMMAND ${GIT_EXECUTABLE} diff --quiet ${tag} + RESULT_VARIABLE REPO_IS_PATCHED WORKING_DIRECTORY "${CCCL_SOURCE_DIR}") -if(NOT ${REPO_IS_DIRTY}) +if(NOT ${REPO_IS_PATCHED}) message(FATAL_ERROR "The repo was downloaded to ${CCCL_SOURCE_DIR} but not patched.") endif() diff --git a/testing/cpm/cpm_find-patch-command/override.json b/testing/cpm/cpm_find-patch-command/override.json new file mode 100644 index 00000000..fa73f144 --- /dev/null +++ b/testing/cpm/cpm_find-patch-command/override.json @@ -0,0 +1,18 @@ +{ + "packages": { + "CCCL": { + "patches": [ + { + "file": "${current_json_dir}/patches/0001-move-git-sha1.patch", + "issue": "Move git sha1", + "fixed_in": "" + }, + { + "file": "${current_json_dir}/patches/0002-move-git-sha1-a-second-time.patch", + "issue": "Move git sha1 a second time", + "fixed_in": "" + } + ] + } + } +} diff --git a/testing/cpm/cpm_find-patch-command/patches/0001-move-git-sha1.patch b/testing/cpm/cpm_find-patch-command/patches/0001-move-git-sha1.patch new file mode 100644 index 00000000..c721f937 --- /dev/null +++ b/testing/cpm/cpm_find-patch-command/patches/0001-move-git-sha1.patch @@ -0,0 +1,19 @@ +From deacd3fafd7fcfee954ae3044ae3ab60d36a9f3a Mon Sep 17 00:00:00 2001 +From: Robert Maynard +Date: Wed, 31 Jan 2024 15:00:47 -0500 +Subject: [PATCH 1/2] Move GIT SHA1 + +--- + git_file_1.txt | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 git_file_1.txt + +diff --git a/git_file_1.txt b/git_file_1.txt +new file mode 100644 +index 00000000..b242c360 +--- /dev/null ++++ b/git_file_1.txt +@@ -0,0 +1 @@ ++added file +-- +2.43.0 diff --git a/testing/cpm/cpm_find-patch-command/patches/0002-move-git-sha1-a-second-time.patch b/testing/cpm/cpm_find-patch-command/patches/0002-move-git-sha1-a-second-time.patch new file mode 100644 index 00000000..1986f6d5 --- /dev/null +++ b/testing/cpm/cpm_find-patch-command/patches/0002-move-git-sha1-a-second-time.patch @@ -0,0 +1,19 @@ +From 3588e151030a30661b310a876f7cc450d6ca9201 Mon Sep 17 00:00:00 2001 +From: Robert Maynard +Date: Wed, 31 Jan 2024 15:01:21 -0500 +Subject: [PATCH 2/2] Move GIT SHA1 a second time + +--- + git_file_2.txt | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 git_file_2.txt + +diff --git a/git_file_2.txt b/git_file_2.txt +new file mode 100644 +index 00000000..fa240558 +--- /dev/null ++++ b/git_file_2.txt +@@ -0,0 +1 @@ ++added another file +-- +2.43.0