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

Remove CCCL patch for PR 211. #640

Merged
merged 2 commits into from
Jul 9, 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
47 changes: 0 additions & 47 deletions rapids-cmake/cpm/patches/cccl/revert_pr_211.diff

This file was deleted.

9 changes: 1 addition & 8 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 18 additions & 4 deletions testing/cpm/cpm_find-patch-command/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
18 changes: 18 additions & 0 deletions testing/cpm/cpm_find-patch-command/override.json
Original file line number Diff line number Diff line change
@@ -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": ""
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From deacd3fafd7fcfee954ae3044ae3ab60d36a9f3a Mon Sep 17 00:00:00 2001
From: Robert Maynard <[email protected]>
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 3588e151030a30661b310a876f7cc450d6ca9201 Mon Sep 17 00:00:00 2001
From: Robert Maynard <[email protected]>
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