Skip to content

Commit

Permalink
Babelstream benchmark activation and refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonEhrig authored and mehmetyusufoglu committed Sep 3, 2024
1 parent 05030c0 commit 6f755f1
Show file tree
Hide file tree
Showing 8 changed files with 1,039 additions and 940 deletions.
32 changes: 27 additions & 5 deletions benchmarks/babelstream/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,31 @@ if(NOT TARGET alpaka::alpaka)
endif()
endif()

alpaka_add_executable(${PROJECT_NAME} src/main.cpp src/Stream.h src/AlpakaStream.cpp src/AlpakaStream.h)
target_compile_definitions(${PROJECT_NAME} PUBLIC ALPAKA)
target_link_libraries(${PROJECT_NAME} PUBLIC alpaka::alpaka)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER benchmarks)

# add_test(NAME ${_TARGET_NAME} COMMAND ${_TARGET_NAME})
set(_TARGET_NAME "babelstream")
append_recursive_files_add_to_src_group("src/" "src/" "cpp" _FILES_SOURCE)

alpaka_add_executable(
${_TARGET_NAME}
${_FILES_SOURCE})

target_include_directories(
${_TARGET_NAME}
PRIVATE "src")

target_link_libraries(
${_TARGET_NAME}
PRIVATE common)

set_target_properties(${_TARGET_NAME} PROPERTIES FOLDER benchmarks/babelstream)

#Run as a ctest
if(alpaka_CI)
# Only run for release builds since this is a benchmark
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_test(NAME ${_TARGET_NAME} COMMAND ${_TARGET_NAME})
endif()
else()
# For a normal benchmark test, number of samples should be equal to the default value.
add_test(NAME ${_TARGET_NAME} COMMAND ${_TARGET_NAME})
endif()
230 changes: 0 additions & 230 deletions benchmarks/babelstream/src/AlpakaStream.cpp

This file was deleted.

63 changes: 0 additions & 63 deletions benchmarks/babelstream/src/AlpakaStream.h

This file was deleted.

Loading

0 comments on commit 6f755f1

Please sign in to comment.