Files
rocm-systems/examples/transpose/CMakeLists.txt
T
Jonathan R. Madsen a061b7947f Integrated perfetto + roctracer (#5)
- hosttrace library automatically collects and merges timestamps for HIP API calls and kernels with the host-side instrumentation
  - mostly eliminates the need for using external rocprof
- added thread_instruction_count in perfetto output
- increased hosttrace min_loop_address_range to 512
- disabled instrumenting functions with dynamic callsites by default
- miscellaneous cmake updates

* roctracer support

- fully integrated perfetto + roctracer outputs
- thread_instruction_count in perfetto
- increased min_loop_address_range to 512
- disabled instrumenting functions with dynamic callsites by default
- updated timemory submodule

* hosttrace_launch_compiler

- support for using an alternative compiler as needed via launch compiler
- elfio added as submodule (not currently used)
- miscellaneous cmake updates

* README update + host/device categories + misc

- timemory fix for TIMEMORY_ROCTRACER_ENABLED
- transpose fix

* papi_tuple_t -> papi_tot_ins

- minor fix to Findroctracer.cmake
2021-09-06 22:23:24 -05:00

44 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(hosttrace-transpose
LANGUAGES CXX)
find_program(HIPCC_EXECUTABLE NAMES hipcc)
if(NOT HIPCC_EXECUTABLE)
message(AUTHOR_WARNING "hipcc could not be found. Cannot build transpose target")
return()
endif()
option(TRANSPOSE_USE_MPI "Enable MPI support in transpose exe" ${TIMEMORY_USE_MPI})
if(TRANSPOSE_USE_MPI)
find_package(MPI REQUIRED)
endif()
add_executable(transpose transpose.cpp)
if(CMAKE_CXX_COMPILER_IS_CLANG AND TARGET hosttrace::hosttrace-compile-options)
target_link_libraries(transpose PRIVATE hosttrace::hosttrace-compile-options)
else()
target_compile_options(transpose PRIVATE -W -Wall)
endif()
if(TRANSPOSE_USE_MPI)
target_compile_definitions(transpose PRIVATE USE_MPI)
target_link_libraries(transpose PRIVATE MPI::MPI_C)
endif()
if(NOT CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set_target_properties(transpose PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
if(NOT CMAKE_CXX_COMPILER_IS_HIPCC AND HIPCC_EXECUTABLE)
# defined in MacroUtilities.cmake
hosttrace_custom_compilation(
COMPILER ${HIPCC_EXECUTABLE}
TARGET transpose)
endif()
endif()