forked from NVIDIA/spark-rapids-jni
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support cudf pin with rapids-cmake (NVIDIA#1877)
* Use rapids-cmake to pin cudf dependencies to known working SHA1's * Use git download rapids-cmake So that we can get SHA Use same format of CopyRight Use cudf/rapids_config.cmake which is renamed from fetch_rapids.cmake Update versions to latest Signed-off-by: Gary Shen <[email protected]> * Commit cudf to the latest code before mvn verify Signed-off-by: Gary Shen <[email protected]> * Remove the first commit of cudf since the second one can commit it at once Signed-off-by: Gary Shen <[email protected]> --------- Signed-off-by: Gary Shen <[email protected]> Co-authored-by: Robert Maynard <[email protected]>
- Loading branch information
1 parent
5f642ba
commit d8771da
Showing
7 changed files
with
211 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# 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. | ||
# | ||
|
||
if(NOT DEFINED rapids-cmake-dir) | ||
include(../cudf/rapids_config.cmake) | ||
endif() | ||
|
||
include(rapids-cpm) | ||
rapids_cpm_init() | ||
|
||
function(add_override_if_requested) | ||
if(CUDF_DEPENDENCY_PIN_MODE STREQUAL pinned) | ||
include(${rapids-cmake-dir}/cpm/package_override.cmake) | ||
rapids_cpm_package_override(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/versions.json) | ||
|
||
message(STATUS "Pinning CUDF dependencies to values found in ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/versions.json") | ||
else() | ||
include(${rapids-cmake-dir}/cpm/generate_pinned_versions.cmake) | ||
rapids_cpm_generate_pinned_versions(OUTPUT ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/versions.json) | ||
|
||
message(STATUS "Building with latest CUDF dependencies (saving pinned versions to ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/versions.json)") | ||
endif() | ||
endfunction() | ||
add_override_if_requested() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d0670231b614f757645e6b3d4f456fea89aa282a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# | ||
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
# 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. | ||
# | ||
|
||
string(TOLOWER "${CUDF_DEPENDENCY_PIN_MODE}" CUDF_DEPENDENCY_PIN_MODE) | ||
if(NOT (CUDF_DEPENDENCY_PIN_MODE STREQUAL pinned OR | ||
CUDF_DEPENDENCY_PIN_MODE STREQUAL latest)) | ||
message(FATAL_ERROR "The CUDF_DEPENDENCY_PIN_MODE variable must be set to either `pinned` or `latest`.") | ||
endif() | ||
|
||
function(set_rapids_cmake_pin_sha1) | ||
set(rapids-cmake-sha "${rapids-cmake-sha}" PARENT_SCOPE) | ||
|
||
message(STATUS "Pinning rapids-cmake SHA1 to ${rapids-cmake-sha}") | ||
endfunction() | ||
|
||
# We need to set the rapids-cmake SHA1 before any CMake code in libcudf is executed when | ||
# we are in pin mode. Otherwise we will use the latest rapids-cmake version since that | ||
# is what cudf does via `fetch_rapids.cmake` | ||
if(CUDF_DEPENDENCY_PIN_MODE STREQUAL pinned) | ||
# Extract the rapids sha1 from the file | ||
file(READ "${CMAKE_CURRENT_LIST_DIR}/rapids-cmake.sha" rapids-cmake-sha) | ||
string(STRIP rapids-cmake-sha "${rapids-cmake-sha}") | ||
string(REPLACE "\n" "" rapids-cmake-sha "${rapids-cmake-sha}") | ||
set(rapids-cmake-sha "${rapids-cmake-sha}" CACHE STRING "rapids-cmake sha to use" FORCE) | ||
message(STATUS "Pinning rapids-cmake SHA1 [${rapids-cmake-sha}]") | ||
else() | ||
set(rapids-cmake-fetch-via-git "ON" CACHE STRING "Make sure rapids-cmake is cloned so we can get SHA value" FORCE) | ||
endif() | ||
|
||
# We need to use a project() call hook, since rapids-cmake cpm_init() | ||
# can't be called from a `-C` CMake file | ||
set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES "${CMAKE_CURRENT_LIST_DIR}/add_dependency_pins.cmake" CACHE FILEPATH "" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
{ | ||
"packages" : | ||
{ | ||
"Arrow" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "740889f413af9b1ae1d81eb1e5a4a9fb4ce9cf97", | ||
"git_url" : "https://github.com/apache/arrow.git", | ||
"version" : "14.0.2" | ||
}, | ||
"CCCL" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "36f379f29660761fe033a1306ca9dab6a88cb65c", | ||
"git_url" : "https://github.com/NVIDIA/cccl.git", | ||
"patches" : | ||
[ | ||
{ | ||
"file" : "cccl/bug_fixes.diff", | ||
"fixed_in" : "2.3", | ||
"issue" : "CCCL installs header-search.cmake files in nondeterministic order and has a typo in checking target creation that leads to duplicates" | ||
}, | ||
{ | ||
"file" : "cccl/hide_kernels.diff", | ||
"fixed_in" : "2.3", | ||
"issue" : "Mark all cub and thrust kernels with hidden visibility [https://github.com/nvidia/cccl/pulls/443]" | ||
}, | ||
{ | ||
"file" : "cccl/revert_pr_211.diff", | ||
"fixed_in" : "", | ||
"issue" : "thrust::copy introduced a change in behavior that causes failures with cudaErrorInvalidValue." | ||
}, | ||
{ | ||
"file" : "${current_json_dir}/thrust_disable_64bit_dispatching.diff", | ||
"fixed_in" : "", | ||
"issue" : "Remove 64bit dispatching as not needed by libcudf and results in compiling twice as many kernels [https://github.com/rapidsai/cudf/pull/11437]" | ||
}, | ||
{ | ||
"file" : "${current_json_dir}/thrust_faster_sort_compile_times.diff", | ||
"fixed_in" : "", | ||
"issue" : "Improve Thrust sort compile times by not unrolling loops for inlined comparators [https://github.com/rapidsai/cudf/pull/10577]" | ||
}, | ||
{ | ||
"file" : "${current_json_dir}/thrust_faster_scan_compile_times.diff", | ||
"fixed_in" : "", | ||
"issue" : "Improve Thrust scan compile times by reducing the number of kernels generated [https://github.com/rapidsai/cudf/pull/8183]" | ||
} | ||
], | ||
"version" : "2.2.0" | ||
}, | ||
"GTest" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "b796f7d44681514f58a683a3a71ff17c94edb0c1", | ||
"git_url" : "https://github.com/google/googletest.git", | ||
"version" : "1.13.0" | ||
}, | ||
"KvikIO" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "30b1dc1aa9dc8694fc7babb81e33664c56a9b2ff", | ||
"git_url" : "https://github.com/rapidsai/kvikio.git", | ||
"version" : "24.04.0" | ||
}, | ||
"NVTX3" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "e170594ac7cf1dac584da473d4ca9301087090c1", | ||
"git_url" : "https://github.com/NVIDIA/NVTX.git", | ||
"version" : "3.1.0" | ||
}, | ||
"cuco" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "56c53beb6fb0cafd265b7fcc3df78ae487811b22", | ||
"git_url" : "https://github.com/NVIDIA/cuCollections.git", | ||
"version" : "0.0.1" | ||
}, | ||
"dlpack" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "365b823cedb281cd0240ca601aba9b78771f91a3", | ||
"git_url" : "https://github.com/dmlc/dlpack.git", | ||
"version" : "0.8" | ||
}, | ||
"jitify" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "047df5e87d84834f8f4225898476145741acfa80", | ||
"git_url" : "https://github.com/rapidsai/jitify.git", | ||
"version" : "2.0.0" | ||
}, | ||
"rmm" : | ||
{ | ||
"always_download" : true, | ||
"git_shallow" : false, | ||
"git_tag" : "2c161dad4aa732e7a6901ab512aa9a0fac85afc4", | ||
"git_url" : "https://github.com/rapidsai/rmm.git", | ||
"version" : "24.04.0" | ||
} | ||
} | ||
} |