CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
62 lines
1.9 KiB
CMake
62 lines
1.9 KiB
CMake
# ########################################################################
|
|
# Copyright 2024-2025 Advanced Micro Devices, Inc.
|
|
# ########################################################################
|
|
|
|
# ###########################
|
|
# rocThrust benchmarks
|
|
# ###########################
|
|
|
|
# Common functionality for configuring rocThrust's benchmarks
|
|
|
|
# Registers a .cu as C++ rocThrust benchmark
|
|
function(add_thrust_benchmark BENCHMARK_NAME BENCHMARK_SOURCE NOT_INTERNAL)
|
|
set(BENCHMARK_TARGET "benchmark_thrust_${BENCHMARK_NAME}")
|
|
if(USE_HIPCXX)
|
|
set_source_files_properties(${BENCHMARK_SOURCE}
|
|
PROPERTIES
|
|
LANGUAGE HIP
|
|
)
|
|
else()
|
|
set_source_files_properties(${BENCHMARK_SOURCE}
|
|
PROPERTIES
|
|
LANGUAGE CXX
|
|
)
|
|
endif()
|
|
add_executable(${BENCHMARK_TARGET} ${BENCHMARK_SOURCE})
|
|
|
|
target_compile_options(${BENCHMARK_TARGET} PRIVATE ${COMPILE_OPTIONS})
|
|
target_link_libraries(${BENCHMARK_TARGET}
|
|
PRIVATE
|
|
rocthrust
|
|
roc::rocprim_hip
|
|
)
|
|
# Internal benchmark does not use Google Benchmark nor rocRAND.
|
|
# This can be omited when that benchmark is removed.
|
|
if(NOT_INTERNAL)
|
|
target_link_libraries(${BENCHMARK_TARGET}
|
|
PRIVATE
|
|
roc::rocrand
|
|
benchmark::benchmark
|
|
)
|
|
endif()
|
|
foreach(gpu_target ${GPU_TARGETS})
|
|
target_link_libraries(${BENCHMARK_TARGET}
|
|
INTERFACE
|
|
--cuda-gpu-arch=${gpu_target}
|
|
)
|
|
endforeach()
|
|
|
|
# Separate normal from internal benchmarks
|
|
if(NOT_INTERNAL)
|
|
set(OUTPUT_DIR "${CMAKE_BINARY_DIR}/benchmark/")
|
|
else()
|
|
set(OUTPUT_DIR "${CMAKE_BINARY_DIR}/benchmark/internal/")
|
|
endif()
|
|
|
|
set_target_properties(${BENCHMARK_TARGET}
|
|
PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}"
|
|
)
|
|
rocm_install(TARGETS ${BENCHMARK_TARGET} COMPONENT benchmarks)
|
|
endfunction()
|