forked from STEllAR-GROUP/hpx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request STEllAR-GROUP#6448 from vrnimje/nano_test
Standardising Benchmarks, with support for nanobench as an option for its backend
- Loading branch information
Showing
14 changed files
with
449 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright (c) 2024 Vedant Nimje | ||
# | ||
# SPDX-License-Identifier: BSL-1.0 | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
name: Linux CI (Debug) with Benchmark Test | ||
|
||
on: [pull_request] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: stellargroup/build_env:14 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure | ||
shell: bash | ||
run: | | ||
cmake \ | ||
. \ | ||
-Bbuild \ | ||
-GNinja \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DHPX_WITH_MALLOC=system \ | ||
-DHPX_WITH_FETCH_ASIO=ON \ | ||
-DHPX_WITH_EXAMPLES=ON \ | ||
-DHPX_WITH_TESTS=ON \ | ||
-DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \ | ||
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On | ||
- name: Build | ||
shell: bash | ||
run: | | ||
cmake --build build/ --target tests.performance.modules.segmented_algorithms.minmax_element_performance | ||
- name: Test | ||
shell: bash | ||
run: | | ||
cd build | ||
./bin/minmax_element_performance_test | ||
- name: Test with detailed output | ||
shell: bash | ||
run: | | ||
cd build | ||
./bin/minmax_element_performance_test --detailed_bench |
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,48 @@ | ||
# Copyright (c) 2024 Vedant Nimje | ||
# | ||
# SPDX-License-Identifier: BSL-1.0 | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
name: Linux CI (Debug) with Nanobench Benchmark Test | ||
|
||
on: [pull_request] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: stellargroup/build_env:14 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure | ||
shell: bash | ||
run: | | ||
cmake \ | ||
. \ | ||
-Bbuild \ | ||
-GNinja \ | ||
-DCMAKE_BUILD_TYPE=Debug \ | ||
-DHPX_WITH_MALLOC=system \ | ||
-DHPX_WITH_FETCH_ASIO=ON \ | ||
-DHPX_WITH_EXAMPLES=ON \ | ||
-DHPX_WITH_TESTS=ON \ | ||
-DHPX_WITH_NANOBENCH=ON \ | ||
-DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \ | ||
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On | ||
- name: Build | ||
shell: bash | ||
run: | | ||
cmake --build build/ --target tests.performance.modules.segmented_algorithms.minmax_element_performance | ||
- name: Test | ||
shell: bash | ||
run: | | ||
cd build | ||
./bin/minmax_element_performance_test | ||
- name: Test with detailed output | ||
shell: bash | ||
run: | | ||
cd build | ||
./bin/minmax_element_performance_test --detailed_bench |
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,47 @@ | ||
include(FetchContent) | ||
|
||
fetchcontent_declare( | ||
nanobench | ||
GIT_REPOSITORY https://github.com/martinus/nanobench.git | ||
GIT_TAG v4.3.11 | ||
GIT_SHALLOW TRUE | ||
) | ||
|
||
if(NOT nanobench_POPULATED) | ||
fetchcontent_populate(nanobench) | ||
endif() | ||
set(Nanobench_ROOT ${nanobench_SOURCE_DIR}) | ||
|
||
add_library(nanobench INTERFACE) | ||
target_include_directories( | ||
nanobench SYSTEM INTERFACE $<BUILD_INTERFACE:${Nanobench_ROOT}/src/include/> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
|
||
install( | ||
TARGETS nanobench | ||
EXPORT HPXNanobenchTarget | ||
COMPONENT core | ||
) | ||
|
||
install( | ||
FILES ${NANOBENCH_ROOT}/include/nanobench.h | ||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
COMPONENT core | ||
) | ||
|
||
export( | ||
TARGETS nanobench | ||
NAMESPACE nanobench:: | ||
FILE "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${HPX_PACKAGE_NAME}/HPXNanobenchTarget.cmake" | ||
) | ||
|
||
install( | ||
EXPORT HPXNanobenchTarget | ||
NAMESPACE nanobench:: | ||
FILE HPXNanobenchTarget.cmake | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${HPX_PACKAGE_NAME} | ||
COMPONENT cmake | ||
) | ||
|
||
add_library(nanobench::nanobench ALIAS nanobench) |
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
Oops, something went wrong.