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
88 lines
3.4 KiB
CMake
88 lines
3.4 KiB
CMake
################################################################################
|
|
# Copyright (c) 2024 - 2026 Advanced Micro Devices, Inc.
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in all
|
|
# copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
# SOFTWARE.
|
|
#
|
|
################################################################################
|
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
# ROCM Path
|
|
if(DEFINED ENV{ROCM_PATH})
|
|
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Default ROCm installation path")
|
|
elseif(ROCM_PATH)
|
|
message("-- INFO:ROCM_PATH Set -- ${ROCM_PATH}")
|
|
else()
|
|
set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
|
|
endif()
|
|
# Set AMD Clang as default compiler
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED On)
|
|
set(CMAKE_CXX_EXTENSIONS ON)
|
|
if(NOT DEFINED CMAKE_CXX_COMPILER)
|
|
set(CMAKE_C_COMPILER ${ROCM_PATH}/lib/llvm/bin/amdclang)
|
|
set(CMAKE_CXX_COMPILER ${ROCM_PATH}/lib/llvm/bin/amdclang++)
|
|
endif()
|
|
|
|
project(jpegdecodeperf)
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH ${ROCM_PATH}/lib/cmake)
|
|
|
|
set (HIP_PLATFORM amd CACHE STRING "HIP platform")
|
|
find_package(HIP QUIET)
|
|
find_package(rocjpeg QUIET)
|
|
find_package(rocprofiler-register QUIET)
|
|
|
|
# threads
|
|
find_package(Threads QUIET)
|
|
|
|
if(HIP_FOUND AND rocjpeg_FOUND AND Threads_FOUND AND rocprofiler-register_FOUND)
|
|
# HIP
|
|
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} hip::host)
|
|
#threads
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} Threads::Threads)
|
|
# std filesystem
|
|
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} stdc++fs)
|
|
# rocprofiler-register
|
|
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocprofiler-register::rocprofiler-register)
|
|
|
|
# rocJPEG
|
|
include_directories (${rocjpeg_INCLUDE_DIR})
|
|
set(LINK_LIBRARY_LIST ${LINK_LIBRARY_LIST} rocjpeg::rocjpeg)
|
|
list(APPEND SOURCES ${PROJECT_SOURCE_DIR} jpegdecodeperf.cpp)
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
|
target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARY_LIST})
|
|
else()
|
|
message("-- ERROR!: ${PROJECT_NAME} excluded! unmet dependencies")
|
|
if (NOT HIP_FOUND)
|
|
message(FATAL_ERROR "-- ERROR!: HIP Not Found!")
|
|
endif()
|
|
if (NOT rocjpeg_FOUND)
|
|
message(FATAL_ERROR "-- ERROR!: rocJPEG Not Found!")
|
|
endif()
|
|
if (NOT Threads_FOUND)
|
|
message(FATAL_ERROR "-- ERROR!: Threads Not Found!")
|
|
endif()
|
|
if (NOT rocprofiler-register_FOUND)
|
|
message(FATAL_ERROR "-- ERROR!: rocprofiler-register Not Found!")
|
|
endif()
|
|
endif()
|