Skip to content

Commit cf85f86

Browse files
psamfassmonoatamddomcharrierreger-men
committed
ROCm port
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]> 5fc4be9 'cleanup internal AMD links' <> Mon May 27 08:47:39 2024 -0700 <> reger-men <[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]> b1b441c 'feat: update cmake files and hipify tests/examples/sources' <> Wed May 24 13:02:05 2023 +0000 <> monoatamd <[email protected]> 5944d9e 'initial Draft' <> Fri Feb 17 19:34:05 2023 +0100 <> reger-men <[email protected]> 4aadee4 'Create LICENSE' <> Tue Jan 24 13:50:51 2023 +0100 <> ADiL <[email protected]> f9aebd0 'Delete LICENSE' <> Tue Jan 24 13:50:25 2023 +0100 <> ADiL <[email protected]> 8e47637 'Update README.md' <> Tue Jan 24 13:50:01 2023 +0100 <> ADiL <[email protected]> ebfad50 'Create LICENSE' <> Tue Jan 24 13:47:41 2023 +0100 <> ADiL <[email protected]> ff1cea9 'Delete LICENSE' <> Tue Jan 24 13:47:03 2023 +0100 <> ADiL <[email protected]> 455535f 'Create LICENSE' <> Tue Jan 24 13:45:50 2023 +0100 <> ADiL <[email protected]> 09c0104 'Delete LICENSE' <> Tue Jan 24 13:45:02 2023 +0100 <> ADiL <[email protected]> 7f07e5f 'Update LICENSE' <> Tue Jan 24 13:44:28 2023 +0100 <> ADiL <[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]>
1 parent c041ad6 commit cf85f86

File tree

189 files changed

+3839
-5347
lines changed

Some content is hidden

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

189 files changed

+3839
-5347
lines changed

.clang-format

Lines changed: 17 additions & 0 deletions
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

Lines changed: 0 additions & 63 deletions
This file was deleted.

.git-blame-ignore-revs

Lines changed: 0 additions & 17 deletions
This file was deleted.

.gitignore

Lines changed: 39 additions & 5 deletions
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

Lines changed: 33 additions & 15 deletions
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.20.1 required for rapids-cmake
19+
cmake_minimum_required(VERSION 3.20.1)
320

421
set(CMAKE_CXX_STANDARD 17)
522
set(CMAKE_CUDA_STANDARD 17)
@@ -15,31 +32,25 @@ 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()
30-
31-
option(BUILD_SHARED_LIBS "Build NVBench as a shared library" ON)
41+
# prescribe dependencies
42+
include(cpm/package_override)
43+
rapids_cpm_package_override(${CMAKE_CURRENT_LIST_DIR}/versions.json)
3244

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})
4354

4455
include(cmake/NVBenchConfigTarget.cmake)
4556
include(cmake/NVBenchDependentDlls.cmake)
@@ -48,7 +59,14 @@ include(cmake/NVBenchWriteConfigHeader.cmake)
4859
include(cmake/NVBenchDependencies.cmake)
4960
include(cmake/NVBenchInstallRules.cmake)
5061
include(cmake/NVBenchUtilities.cmake)
62+
include(cmake/NVBenchLibhipcxx.cmake)
5163

64+
# synchronize HIP and CUDA architectures
65+
if (DEFINED CMAKE_HIP_ARCHITECTURES AND NOT CMAKE_CUDA_ARCHITECTURES)
66+
set(CMAKE_CUDA_ARCHITECTURES ${CMAKE_HIP_ARCHITECTURES})
67+
elseif (DEFINED CMAKE_CUDA_ARCHITECTURES AND NOT CMAKE_HIP_ARCHITECTURES)
68+
set(CMAKE_HIP_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES})
69+
endif()
5270
message(STATUS "NVBench CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
5371

5472
add_subdirectory(nvbench)

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

LICENSE

Lines changed: 18 additions & 0 deletions
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)