-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use rapids_cpm_generate_patch_command()
- Loading branch information
1 parent
283d35d
commit f08c274
Showing
4 changed files
with
34 additions
and
21 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
File renamed without changes.
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,16 @@ | ||
{ | ||
"packages" : { | ||
"cutlass" : { | ||
"version": "3.5.1", | ||
"git_url": "https://github.com/NVIDIA/cutlass.git", | ||
"git_tag": "v${version}", | ||
"patches" : [ | ||
{ | ||
"file" : "${current_json_dir}/cutlass/build-export.patch", | ||
"issue" : "Fix build directory export", | ||
"fixed_in" : "" | ||
} | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -13,11 +13,11 @@ | |
# ============================================================================= | ||
|
||
function(find_and_configure_cutlass) | ||
set(oneValueArgs VERSION REPOSITORY PINNED_TAG) | ||
set(options) | ||
set(oneValueArgs) | ||
set(multiValueArgs) | ||
cmake_parse_arguments(PKG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | ||
|
||
find_package(Git REQUIRED) | ||
|
||
# if(RAFT_ENABLE_DIST_DEPENDENCIES OR RAFT_COMPILE_LIBRARIES) | ||
set(CUTLASS_ENABLE_HEADERS_ONLY | ||
ON | ||
|
@@ -36,15 +36,23 @@ function(find_and_configure_cutlass) | |
set(CUDART_LIBRARY "${CUDA_cudart_static_LIBRARY}" CACHE FILEPATH "fixing cutlass cmake code" FORCE) | ||
endif() | ||
|
||
include("${rapids-cmake-dir}/cpm/package_override.cmake") | ||
rapids_cpm_package_override("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../patches/cutlass_override.json") | ||
|
||
include("${rapids-cmake-dir}/cpm/detail/package_details.cmake") | ||
rapids_cpm_package_details(cutlass version repository tag shallow exclude) | ||
|
||
include("${rapids-cmake-dir}/cpm/detail/generate_patch_command.cmake") | ||
rapids_cpm_generate_patch_command(cutlass ${version} patch_command) | ||
|
||
rapids_cpm_find( | ||
NvidiaCutlass ${PKG_VERSION} | ||
NvidiaCutlass ${version} | ||
GLOBAL_TARGETS nvidia::cutlass::cutlass | ||
CPM_ARGS | ||
GIT_REPOSITORY ${PKG_REPOSITORY} | ||
GIT_TAG ${PKG_PINNED_TAG} | ||
GIT_SHALLOW TRUE | ||
GIT_REPOSITORY ${repository} | ||
GIT_TAG ${tag} | ||
GIT_SHALLOW ${shallow} ${patch_command} | ||
OPTIONS "CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_DIR}" | ||
PATCH_COMMAND ${CMAKE_COMMAND} -E env GIT_COMMITTER_NAME=rapids-cmake [email protected] ${GIT_EXECUTABLE} am -3 ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/patches/cutlass/build-export.patch | ||
) | ||
|
||
if(TARGET CUTLASS AND NOT TARGET nvidia::cutlass::cutlass) | ||
|
@@ -82,15 +90,4 @@ function(find_and_configure_cutlass) | |
) | ||
endfunction() | ||
|
||
set(_cutlass_version 3.5.1) | ||
if(NOT RAFT_CUTLASS_GIT_TAG) | ||
set(RAFT_CUTLASS_GIT_TAG "v${_cutlass_version}") | ||
endif() | ||
|
||
if(NOT RAFT_CUTLASS_GIT_REPOSITORY) | ||
set(RAFT_CUTLASS_GIT_REPOSITORY https://github.com/NVIDIA/cutlass.git) | ||
endif() | ||
|
||
find_and_configure_cutlass( | ||
VERSION ${_cutlass_version} REPOSITORY ${RAFT_CUTLASS_GIT_REPOSITORY} PINNED_TAG ${RAFT_CUTLASS_GIT_TAG} | ||
) | ||
find_and_configure_cutlass() |