Skip to content

Commit

Permalink
[nvidia-nvbench] Update to 2024-06-01 (#240)
Browse files Browse the repository at this point in the history
* NVIDIA/nvbench@a171514
* [nvidia-nvbench] update fix-cmake patch file
  • Loading branch information
luncliff authored Sep 28, 2024
1 parent 39189a3 commit 6a19470
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 46 deletions.
69 changes: 29 additions & 40 deletions ports/nvidia-nvbench/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
diff --git a/cmake/NVBenchConfigTarget.cmake b/cmake/NVBenchConfigTarget.cmake
index 5e5e270..6032918 100644
--- a/cmake/NVBenchConfigTarget.cmake
+++ b/cmake/NVBenchConfigTarget.cmake
@@ -74,6 +74,11 @@ target_compile_options(nvbench.build_interface INTERFACE
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Xcudafe=--display_error_number>
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Wno-deprecated-gpu-targets>
)
+if (WIN32)
+ target_compile_definitions(nvbench.build_interface INTERFACE
+ _USE_MATH_DEFINES
+ )
+endif()
if (NVBench_ENABLE_WERROR)
target_compile_options(nvbench.build_interface INTERFACE
$<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:-Xcudafe=--promote_warnings>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8eb5f88..0605981 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,7 @@ option(NVBench_ENABLE_EXAMPLES "Build NVBench examples." OFF)
option(NVBench_ENABLE_INSTALL_RULES "Install NVBench." ${NVBench_TOPLEVEL_PROJECT})

include(cmake/NVBenchUtilities.cmake) # Must be first
-include(cmake/NVBenchClangdCompileInfo.cmake) # Must be before any targets are created
+# include(cmake/NVBenchClangdCompileInfo.cmake) # Must be before any targets are created

include(cmake/NVBenchConfigTarget.cmake)
include(cmake/NVBenchDependentDlls.cmake)
diff --git a/cmake/NVBenchDependencies.cmake b/cmake/NVBenchDependencies.cmake
index 78fa758..e4a91fe 100644
index 8ba07fe..702e438 100644
--- a/cmake/NVBenchDependencies.cmake
+++ b/cmake/NVBenchDependencies.cmake
@@ -1,48 +1,18 @@
@@ -1,22 +1,13 @@
################################################################################
# fmtlib/fmt
-include("${rapids-cmake-dir}/cpm/fmt.cmake")
Expand All @@ -35,36 +32,28 @@ index 78fa758..e4a91fe 100644
- # Force static to keep fmt internal.
- "BUILD_SHARED_LIBS OFF"
-)
-
-if(NOT fmt_ADDED)
- set(fmt_is_external TRUE)
-endif()
+set(fmt_is_external TRUE) # from vcpkg

################################################################################
# nlohmann/json
-#
-# Following recipe from
-# http://github.com/cpm-cmake/CPM.cmake/blob/master/examples/json/CMakeLists.txt
-# Download the zips because the repo takes an excessively long time to clone.
-rapids_cpm_find(nlohmann_json 3.9.1
- # Release:
@@ -24,17 +15,7 @@ endif()
# Following recipe from
# http://github.com/cpm-cmake/CPM.cmake/blob/master/examples/json/CMakeLists.txt
# Download the zips because the repo takes an excessively long time to clone.
-rapids_cpm_find(nlohmann_json 3.11.3
- CPM_ARGS
- URL https://github.com/nlohmann/json/releases/download/v3.9.1/include.zip
- URL_HASH SHA256=6bea5877b1541d353bd77bdfbdb2696333ae5ed8f9e8cc22df657192218cad91
- PATCH_COMMAND
- # Work around compiler bug in nvcc 11.0, see NVIDIA/NVBench#18
- ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/patches/nlohmann_json.hpp"
- "./include/nlohmann/json.hpp"
-
- # Development version:
- # I'm waiting for https://github.com/nlohmann/json/issues/2676 to be fixed,
- # leave this in to simplify testing patches as they come out.
- # CPM_ARGS
- # VERSION develop
- # URL https://github.com/nlohmann/json/archive/refs/heads/develop.zip
- # OPTIONS JSON_MultipleHeaders ON
- URL https://github.com/nlohmann/json/releases/download/v3.11.3/include.zip
- URL_HASH SHA256=a22461d13119ac5c78f205d3df1db13403e58ce1bb1794edc9313677313f4a9d
- PATCH_COMMAND
- ${CMAKE_COMMAND}
- -D "CUDA_VERSION=${CMAKE_CUDA_COMPILER_VERSION}"
- -D "CXX_VERSION=${CMAKE_CXX_COMPILER_VERSION}"
- -D "CXX_ID=${CMAKE_CXX_COMPILER_ID}"
- -P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/patches/json_unordered_map_ice.cmake"
-)
+find_package(nlohmann_json CONFIG REQUIRED)

Expand Down
9 changes: 5 additions & 4 deletions ports/nvidia-nvbench/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH RAPIDS_SOURCE_PATH
REPO rapidsai/rapids-cmake
REF v24.02.00
SHA512 d9701353e7a11c339ed11e9867ca22fc937ef399820960bc8c4f4a8a78efa7a24e2ff46080b3ac6ff84cfd3c34780331d8c9a4aeaf4ccee565e3953260bb37ae
REF v24.08.00
SHA512 140cebd0a42114bb58b6c6e694b98de118b1d58c62187f57036ad75407fd51c0e3c012e8f7312bc0a86ab592cf4033184260899d3e1894b9848e3c84ddebc9d9
HEAD_REF main
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO NVIDIA/nvbench
REF d8dced8a64d9ce305add92fa6d274fd49b569b7e
SHA512 ff9b8379b7e0d39f31d0635a15bfcbf818592c4e8e85471592a6b50407a74088f4cfe9c7876009b1ef99693a4a4d380815af1505a2e9d413662087f6da46ec10
REF a171514056e5d6a7f52a035dd6c812fa301d4f4f
SHA512 5a5fb4886495fa0682c7331ac12610b0c09caa95a1f31b8a2c5af69ebaa1965a841b6f23c1226c29c9020e7db6988926db142d36792d32b7cce04edae2b0cc08
PATCHES
fix-cmake.patch
HEAD_REF main
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
"-Drapids-cmake-dir:PATH=${RAPIDS_SOURCE_PATH}/rapids-cmake"
"-DCMAKE_MODULE_PATH:PATH=${RAPIDS_SOURCE_PATH}/rapids-cmake"
Expand Down
2 changes: 1 addition & 1 deletion ports/nvidia-nvbench/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nvidia-nvbench",
"version-date": "2024-01-13",
"version-date": "2024-06-01",
"description": "CUDA Kernel Benchmarking Library",
"homepage": "https://github.com/NVIDIA/nvbench",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"port-version": 1
},
"nvidia-nvbench": {
"baseline": "2024-01-13",
"baseline": "2024-06-01",
"port-version": 0
},
"nvidia-tools-extension-sdk": {
Expand Down
5 changes: 5 additions & 0 deletions versions/n-/nvidia-nvbench.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f21fc3f0d40b0ef2d100a03be0da2cfcff27e6c0",
"version-date": "2024-06-01",
"port-version": 0
},
{
"git-tree": "ea2e382bd110cc20157e3b48adc8631cde87d2d5",
"version-date": "2024-01-13",
Expand Down

0 comments on commit 6a19470

Please sign in to comment.