Skip to content

Commit d6bbd78

Browse files
monoatamdpsamfassdomcharrierreger-mendkbhaskaran
committed
ROCm port
3b5ee46 NVBenchRapidsCMake*:configurable ROCm-DS.cmake repo <> Thu Apr 24 20:26:42 2025 +0000 <> domcharrier <[email protected]> Make the repository from which to obtain the ROCm-DS.cmake script configurable via the environment variable `ROCm-DS_CMAKE_SCRIPT_REPO`. e750bc0 bump minimum CMake version to 3.23 for rocm-ds-cmake compatibility <> Mon Apr 14 02:44:48 2025 -0700 <> Philipp Samfass <[email protected]> 8cb2b22 feat(*RapidsCMake.*): ROCm-DS_CMAKE_MODULE_PATH <> Mon Apr 14 06:25:37 2025 +0000 <> domcharrier <[email protected]> Change to ROCm-DS_CMAKE_MODULE_PATH from ROCm-DS_CMAKE_FROM_MODULE_PATH as this allows setting pointing to the ROCmDS-CMake module files via an environment variable, which in turn allows to inject this information easier into more complex build processes (scikit-build). 11072be cmake/tests/*:use nvbench:: tgts via hipbench pkg <> Tue Apr 1 13:25:42 2025 +0000 <> domcharrier <[email protected]> Add option `FIND_NVBENCH` to switch between the two packages provided by a hipbench installation. b1da144 feat(cmake): hipbench pkg provides nvbench:: too <> Tue Apr 1 13:24:13 2025 +0000 <> domcharrier <[email protected]> find_pacakge(hipbench) now also provides access to the `nvbench::` targets. 36ce614 cmake/tests: add test for find_package(hipbench) <> Fri Mar 28 13:41:46 2025 +0000 <> [email protected] <domcharrier> 5c26c6a cmake: export a hipbench package too <> Mon Mar 31 09:04:04 2025 +0000 <> [email protected] <domcharrier> 4f91ba5 feat(nvbench/CMake*.txt): add hipbench targets <> Mon Mar 31 08:55:29 2025 +0000 <> [email protected] <domcharrier> * Provide hipbench:: ALIAS targets for add_subdirectory type usage. * Create and install hipbench INTERFACE target that is linked with nvbench. 5eff081 CMakeLists.txt: disable installing CPM downloads <> Fri Mar 28 16:11:06 2025 +0000 <> [email protected] <domcharrier> Add option for disabling installation of packages downloaded by CPM. This won't affect packages that CPM has found locally as those are not installed in any case. Motivation: When creating packages, one might want to package/install the NVBench files in isolation and not install libhipcxx files. 759bfce feat(CMakeLists.txt): use packaging cmake module <> Fri Mar 28 11:24:49 2025 +0000 <> domcharrier <[email protected]> d394d2f + cmake/NVBenchPackaging.cmake: includes CPACK <> Fri Mar 28 11:24:18 2025 +0000 <> domcharrier <[email protected]> 935ee1f hotfix(NVBenchDependencies.cmake): use fmt version from ROCm-DS-cmake <> Wed Mar 26 02:49:13 2025 -0700 <> Philipp Samfass <[email protected]> Details: fmt 9.1.0 fails to compile with more recent gcc versions (observed with GCC 13.3.0). We now let rocm-ds-cmake pick the fmt version which in this case happens to be 10.* and which no longer suffers from the previously observed compiler error: ``` /home/sphilipp/hipBench/build/_deps/fmt-src/include/fmt/core.h:1735:15: error: possibly dangling reference to a temporary [-Werror=dangling-reference] 1735 | const auto& arg = arg_mapper<Context>().map(FMT_FORWARD(val)); | ^~~ /home/sphilipp/hipBench/build/_deps/fmt-src/include/fmt/core.h:1735:46: note: the temporary was destroyed at the end of the full expression 'fmt::v9::detail::arg_mapper<fmt::v9::basic_format_context<fmt::v9::appender, char> >().fmt::v9::detail::arg_mapper<fmt::v9::basic_format_context<fmt::v9::appender, char> >::map<std::vector<std::__cxx11::basic_string<char> >&>((* & val))' 1735 | const auto& arg = arg_mapper<Context>().map(FMT_FORWARD(val)); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ``` bd776c5 feat: +option to find ROCmDS-CMake on module path <> Tue Mar 18 18:20:23 2025 +0000 <> domcharrier <[email protected]> Adds an option ROCm-DS_CMAKE_FROM_MODULE_PATH [default=OFF] that disables fetching of ROCm-DS CMake script and repo assuming that ROCm-DS CMake modules can be found via the CMAKE_MODULE_PATH. 38836c6 doc: add disclaimer <> Fri Dec 6 17:46:22 2024 +0100 <> Philipp Samfass <[email protected]> 4a2e88e add .gitignore <> Mon Oct 28 19:36:25 2024 +0000 <> charlifu <[email protected]> Signed-off-by: charlifu <[email protected]> a5e1311 fix(type_axis.cxx): explicitly cast to size_t to avoid sign conversion warning <> Tue Oct 29 08:58:25 2024 -0700 <> Philipp Samfass <[email protected]> 1aa00cc + versions.json: empty, allows updating via CI <> Thu Sep 19 08:32:36 2024 +0000 <> domcharrier <[email protected]> * Allows to control dependencies from CI process. NOTE ("first to record wins"): "If a project is listed in multiple override files, the first file values will be used, and all later calls for that packaged will be ignored. This "first to record, wins" approach is used to match FetchContent, and allows parent projects to override child projects." 73d4e9c sync: use public rapids-cmake <> Thu Sep 19 09:17:57 2024 +0000 <> domcharrier <[email protected]> Synchronize branch with public hipBench repo. a684069 doc(README.md): fix formatting of example output in README <> Fri Sep 6 01:48:14 2024 -0700 <> Philipp Samfass <[email protected]> 3dde7a6 fix(testing/cm*/test*/CMakeLists.*):all tests pass <> Thu Sep 5 19:30:18 2024 +0000 <> domcharrier <[email protected]> Reintroduce code that was removed during hipification process. Now all tests pass (assuming CMAKE_PREFIX_PATH contains the ROCm path). c9594d4 fix(testing/cmake/CMakeLists.txt): + libhipcxx_DIR <> Thu Sep 5 18:51:11 2024 +0000 <> domcharrier <[email protected]> In addition to ``` -D "NVBench_DIR=${tmp_install_prefix}/lib/cmake/nvbench/" ``` we add ``` -D "libhipcxx_DIR=${tmp_install_prefix}/lib/rapids/cmake/libhipcxx/" ``` This fixes the last failing test `nvbench.test.cmake.test_export.install_tree` to 50 %. Verbose test output: ```cmake 36: Running test command: "/opt/conda/envs/cudf_dev/bin/ctest" "--output-on-failure" 36: Test command failed: /opt/conda/envs/cudf_dev/bin/ctest 36: Test project /home/mohammad/docharri/hipdf/DEPS/hipbench/build/testing/cmake/test_export/install_tree 36: Start 1: test_bench 36: 1/2 Test #1: test_bench ....................... Passed 1.65 sec 36: Start 2: nvbench_ctl 36: 2/2 Test #2: nvbench_ctl ......................***Failed 0.00 sec 36: /home/mohammad/docharri/hipdf/DEPS/hipbench/build/testing/cmake/test_nvbench_install/bin/nvbench-ctl: error while loading shared libraries: libnvbench.so: cannot open shared object file: No such file or directory ``` The respective code is in: `testing/cmake/test_export/CMakeLists.txt` This file contains a section with the comment "# Setup LD_LIBRARY_PATH for testing". Very likely this has something to do with the remaining issue. 650008b fix(**Libhipcxx.cmake): use correct export sets <> Thu Sep 5 18:35:26 2024 +0000 <> domcharrier <[email protected]> Use same sets as other targets: `nvbench-targets`. This fixes test `nvbench.test.cmake.test_export.build_tree` but not the last failing test `nvbench.test.cmake.test_export.install_tree`. c82ec85 fix(**CMakeLists.txt): HIP lang + CUDA=HIP archs <> Thu Sep 5 18:33:00 2024 +0000 <> domcharrier <[email protected]> Use HIP lang instead of CUDA. Allow CMAKE_HIP_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES for specifying AMD GPUs. 301ca37 update ReadMe file <> Tue Jun 4 16:01:27 2024 +0000 <> monoatamd <[email protected]> 336f81e retain nvidia copyright line <> Wed May 8 12:08:04 2024 +0000 <> monoatamd <[email protected]> 44e3b73 update licenses <> Wed May 8 12:01:08 2024 +0000 <> monoatamd <[email protected]> b5e7b3d update linceses <> Tue May 7 16:51:29 2024 +0000 <> monoatamd <[email protected]> 42941e4 update licnese <> Tue May 7 16:19:23 2024 +0000 <> monoatamd <[email protected]> 8d8a210 Remove CI related files. Need to port them later. <> Tue May 7 15:49:14 2024 +0000 <> monoatamd <[email protected]> 28b7743 Remove a WAR: <> Tue May 7 15:46:06 2024 +0000 <> monoatamd <[email protected]> The WAR worked some time ago (https://<redacted>hipBench/commit/6068389724a4bf427612c27ebbdd8b8ff23284ae) and now caues an error: hipErrorInvalidDevice: invalid device ordinal. Also, enable some parts of the code which was disabled before in the same commit. d66ea34 fix file extensions <> Tue May 7 15:16:41 2024 +0000 <> monoatamd <[email protected]> cc297cf rename file extensions to hip from cu.cpp <> Tue May 7 14:08:24 2024 +0000 <> monoatamd <[email protected]> 34a5155 Code cleanup: remove unused (CUPTI AND NVML) files, delete MSVC related snippets in build system. <> Tue May 7 12:49:50 2024 +0000 <> monoatamd <[email protected]> a57c0cf docfix(README.md): add required settings for CMAKE_PREFIX_PATH <> Fri Sep 6 03:05:43 2024 -0700 <> Philipp Samfass <[email protected]> b13cf2f doc(README.md): revise README to include necessary information for HIP port <> Fri Sep 6 01:24:18 2024 -0700 <> Philipp Samfass <[email protected]> 4e391e7 fix build of noisy bench <> Fri Nov 10 01:45:00 2023 -0800 <> Philipp Samfass <[email protected]> 3d839b3 let CMake decide which compiler to use for CXX files <> Fri Nov 10 01:07:56 2023 -0800 <> Philipp Samfass <[email protected]> 487fa8d WIP: allow compiling host code without hipclang <> Fri Nov 10 00:57:18 2023 -0800 <> Philipp Samfass <[email protected]> 42b8b99 bugfix: fixed markdown output for HIP + fixed a few compiler warnings <> Wed Jun 14 13:46:32 2023 +0000 <> Philipp Samfass <[email protected]> 21273d3 fix: delete move assignment as default assignment cannot be generated by hipcc <> Tue Jun 13 12:17:51 2023 +0000 <> Philipp Samfass <[email protected]> 7dfa4e5 fix streams in state_generator <> Thu Jun 1 13:33:06 2023 +0200 <> Philipp Samfass <[email protected]> We found that the streams are not necessarily created on the device on which they will be used. Therefore, we set the correct device with device->set_active before creating the state (which in turn creates the stream). This also seems to fix timeout warnings we have seen in some benchmarks. 00eecda feat: Fix error about default move operator deleted <> Wed May 31 10:21:46 2023 +0000 <> monoatamd <[email protected]> 5857d5b feat: Build tests/examples <> Tue May 30 08:07:35 2023 +0000 <> monoatamd <[email protected]> c0237aa feat: Adapt cmake files <> Tue May 30 07:11:33 2023 +0000 <> monoatamd <[email protected]> Co-authored-by: psamfass <[email protected]> Co-authored-by: monoatamd <[email protected]> Co-authored-by: domcharrier <[email protected]> Co-authored-by: reger-men <[email protected]> Co-authored-by: dkbhaskaran <[email protected]> Co-authored-by: charlifu <[email protected]> Co-authored-by: obersteiner <[email protected]>
1 parent 0ff9cfe commit d6bbd78

File tree

192 files changed

+3983
-5344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+3983
-5344
lines changed

.clang-format

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# Modifications Copyright (c) 2024 Advanced Micro Devices, Inc.
2+
# Permission is hereby granted, free of charge, to any person obtaining a copy
3+
# of this software and associated documentation files (the "Software"), to deal
4+
# in the Software without restriction, including without limitation the rights
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# copies of the Software, and to permit persons to whom the Software is
7+
# furnished to do so, subject to the following conditions:
8+
# The above copyright notice and this permission notice shall be included in
9+
# all copies or substantial portions of the Software.
10+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
16+
# THE SOFTWARE.
17+
118
BasedOnStyle: LLVM
219
AccessModifierOffset: -2
320
AlignAfterOpenBracket: Align

.clangd

-63
This file was deleted.

.git-blame-ignore-revs

-17
This file was deleted.

.gitignore

+39-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1-
build*/
2-
.cache
3-
.idea
4-
cmake-build-*
5-
*~
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# build folder
35+
build/
36+
cmake-build-*/
37+
38+
# VSCode
39+
.vscode/

CMakeLists.txt

+40-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
# 3.23.1 required for rapids-cmake
2-
cmake_minimum_required(VERSION 3.23.1)
1+
# Modifications Copyright (c) 2024 Advanced Micro Devices, Inc.
2+
# Permission is hereby granted, free of charge, to any person obtaining a copy
3+
# of this software and associated documentation files (the "Software"), to deal
4+
# in the Software without restriction, including without limitation the rights
5+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
# copies of the Software, and to permit persons to whom the Software is
7+
# furnished to do so, subject to the following conditions:
8+
# The above copyright notice and this permission notice shall be included in
9+
# all copies or substantial portions of the Software.
10+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
16+
# THE SOFTWARE.
17+
18+
# 3.23 required for rocmds-cmake
19+
cmake_minimum_required(VERSION 3.23)
320

421
set(CMAKE_CXX_STANDARD 17)
522
set(CMAKE_CUDA_STANDARD 17)
@@ -15,31 +32,30 @@ include(cmake/NVBenchRapidsCMake.cmake)
1532
nvbench_load_rapids_cmake()
1633

1734
project(NVBench
18-
LANGUAGES CUDA CXX
35+
LANGUAGES CXX HIP
1936
VERSION 0.1.0
2037
)
2138

2239
nvbench_init_rapids_cmake()
2340

24-
# See NVIDIA/NVBench#52
25-
find_package(CUDAToolkit REQUIRED)
26-
set(cupti_default ON)
27-
if (${CUDAToolkit_VERSION} VERSION_LESS 11.3)
28-
set(cupti_default OFF)
29-
endif()
41+
# prescribe dependencies
42+
include(cpm/package_override)
43+
rapids_cpm_package_override(${CMAKE_CURRENT_LIST_DIR}/versions.json)
3044

31-
option(BUILD_SHARED_LIBS "Build NVBench as a shared library" ON)
32-
33-
option(NVBench_ENABLE_NVML "Build with NVML support from the Cuda Toolkit." ON)
34-
option(NVBench_ENABLE_CUPTI "Build NVBench with CUPTI." ${cupti_default})
45+
# See NVIDIA/NVBench#52
46+
find_package(HIP REQUIRED)
3547

36-
option(NVBench_ENABLE_TESTING "Build NVBench testing suite." OFF)
48+
option(NVBench_ENABLE_TESTING "Build NVBench testing suite." ON)
3749
option(NVBench_ENABLE_DEVICE_TESTING
3850
"Include tests that require a GPU (with locked clocks)."
3951
OFF
4052
)
4153
option(NVBench_ENABLE_EXAMPLES "Build NVBench examples." OFF)
42-
option(NVBench_ENABLE_INSTALL_RULES "Install NVBench." ${NVBench_TOPLEVEL_PROJECT})
54+
option(NVBench_DISABLE_INSTALL_CPM_DOWNLOADS
55+
"Do NOT install/package dependencies DOWNLOADED by CPM together with this project.
56+
This has only an effect on packages downloaded by CPM not those that CPM has found locally."
57+
OFF
58+
)
4359

4460
include(cmake/NVBenchConfigTarget.cmake)
4561
include(cmake/NVBenchDependentDlls.cmake)
@@ -48,7 +64,14 @@ include(cmake/NVBenchWriteConfigHeader.cmake)
4864
include(cmake/NVBenchDependencies.cmake)
4965
include(cmake/NVBenchInstallRules.cmake)
5066
include(cmake/NVBenchUtilities.cmake)
67+
include(cmake/NVBenchLibhipcxx.cmake)
5168

69+
# synchronize HIP and CUDA architectures
70+
if (DEFINED CMAKE_HIP_ARCHITECTURES AND NOT CMAKE_CUDA_ARCHITECTURES)
71+
set(CMAKE_CUDA_ARCHITECTURES ${CMAKE_HIP_ARCHITECTURES})
72+
elseif (DEFINED CMAKE_CUDA_ARCHITECTURES AND NOT CMAKE_HIP_ARCHITECTURES)
73+
set(CMAKE_HIP_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES})
74+
endif()
5275
message(STATUS "NVBench CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
5376

5477
add_subdirectory(nvbench)
@@ -68,3 +91,5 @@ if (NVBench_ENABLE_TESTING)
6891
endif()
6992

7093
nvbench_generate_exports()
94+
95+
include(cmake/NVBenchPackaging.cmake)

CODE_OF_CONDUCT.md

-96
This file was deleted.

LICENSE

+18
Original file line numberDiff line numberDiff line change
@@ -216,3 +216,21 @@ conflicts with the conditions of the GPLv2, you may retroactively and
216216
prospectively choose to deem waived or otherwise exclude such Section(s) of
217217
the License, but only in their entirety and only with respect to the Combined
218218
Software.
219+
220+
MIT License
221+
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
222+
Permission is hereby granted, free of charge, to any person obtaining a copy
223+
of this software and associated documentation files (the "Software"), to deal
224+
in the Software without restriction, including without limitation the rights
225+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
226+
copies of the Software, and to permit persons to whom the Software is
227+
furnished to do so, subject to the following conditions:
228+
The above copyright notice and this permission notice shall be included in all
229+
copies or substantial portions of the Software.
230+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
231+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
232+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
233+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
234+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
235+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
236+
SOFTWARE.

0 commit comments

Comments
 (0)