4208b5654c
* Initial support for GPU hardware counters
* Update find modules for roctracer and rocprofiler
- /opt/rocm/{rocprofiler,roctracer} path is deprecated so tweak search procedure
* Improve ConfigCPack for MPI
* Update rocprofiler
- rocm_metrics()
- minor cleanup
* Update rocm find modules
* declare rocm_metrics + call in omnitrace-avail
* relocate omnitrace-launch-compiler
* REALPATH and find_modules
* Examples cmake (may drop)
* omnitrace-avail
- hw_counter categories
- init rocm
* setenv updates for rocprofiler in library.cpp and dl.cpp
* get_rocm_events config
* gpu::hip_device_count()
* rocm_metrics returns hardware_counters::info
* - relocated library/components/roctracer_callbacks.* to library/roctracer.*
- relocated library/components/rocprofiler.* to library/rocprofiler.*
- cleaned up rocprofiler.hpp
- added perfetto output of rocprofiler
- added timemory output of rocprofiler
- renamed omni.roctracer thread to roctracer.hip
- added roctracer.hsa thread name
- updated timemory submodule to support std::variant
- updated timemory submodule to support = in config value
- updated timemory submodule to support standalone storage
- updated timemory submodule to support new hw counter apis
- updated timemory submodule to prevent label/description caching in data_tracker
* update omnitrace-avail info_type generation
* Update timemory submodule
* rocprofiler component
* cmake formatting
* omnitrace-avail handle no GPUs
- Add -c command-line option for --categories
- support verbosity
* hsa_rsrc_factory throws exceptions
- throw exceptions to avoid aborting on HSA_STATUS_ERROR_NOT_INITIALIZED when advantageous
- removed duplicate specialization of is_available for component::rocprofiler
* rocprofiler symbols for when disabled
* Fix warning in omnitrace-avail
- std::stringstream from initializer list would use explicit constructor
* Fix finalization after settings are deleted
* Reorganized rocprofiler source
* Updated formatting
* Miscellaneous tweaks
- added using statements from timemory
- tweaked the main and thread bundle names
- fixed timemory header includes
76 satır
2.3 KiB
CMake
76 satır
2.3 KiB
CMake
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
|
|
|
project(lulesh LANGUAGES C CXX)
|
|
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
|
|
option(LULESH_BUILD_KOKKOS "Build Kokkos from submodule" ON)
|
|
if(LULESH_BUILD_KOKKOS)
|
|
add_subdirectory(external)
|
|
if(LULESH_USE_CUDA)
|
|
kokkos_compilation(PROJECT)
|
|
elseif(LULESH_USE_HIP AND NOT "${CMAKE_CXX_COMPILER}" MATCHES "hipcc")
|
|
if(NOT HIPCC_EXECUTABLE)
|
|
find_package(hip QUIET)
|
|
|
|
find_program(
|
|
HIPCC_EXECUTABLE
|
|
NAMES hipcc
|
|
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm)
|
|
mark_as_advanced(HIPCC_EXECUTABLE)
|
|
endif()
|
|
kokkos_compilation(PROJECT COMPILER ${HIPCC_EXECUTABLE})
|
|
endif()
|
|
else()
|
|
find_package(Kokkos REQUIRED COMPONENTS separable_compilation)
|
|
kokkos_compilation(PROJECT)
|
|
endif()
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|
set(CMAKE_BUILD_TYPE
|
|
"Release"
|
|
CACHE STRING "CMake build type" FORCE)
|
|
endif()
|
|
|
|
option(LULESH_USE_MPI "Enable MPI" OFF)
|
|
add_library(lulesh-mpi INTERFACE)
|
|
if(LULESH_USE_MPI)
|
|
find_package(MPI REQUIRED)
|
|
target_compile_definitions(lulesh-mpi INTERFACE USE_MPI=1)
|
|
target_link_libraries(lulesh-mpi INTERFACE MPI::MPI_C MPI::MPI_CXX)
|
|
else()
|
|
target_compile_definitions(lulesh-mpi INTERFACE USE_MPI=0)
|
|
endif()
|
|
|
|
if(NOT TARGET Kokkos::kokkos)
|
|
find_package(Kokkos REQUIRED)
|
|
endif()
|
|
|
|
file(GLOB headers ${PROJECT_SOURCE_DIR}/*.h ${PROJECT_SOURCE_DIR}/*.hxx)
|
|
file(GLOB sources ${PROJECT_SOURCE_DIR}/*.cc)
|
|
|
|
add_executable(${PROJECT_NAME} ${sources} ${headers})
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/includes)
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Kokkos::kokkos lulesh-mpi)
|
|
|
|
if(OMNITRACE_INSTALL_EXAMPLES)
|
|
if(LULESH_BUILD_KOKKOS)
|
|
install(
|
|
TARGETS kokkoscore kokkoscontainers
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
COMPONENT omnitrace-examples)
|
|
set_target_properties(
|
|
${PROJECT_NAME} PROPERTIES INSTALL_RPATH
|
|
"\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
|
|
endif()
|
|
install(
|
|
TARGETS ${PROJECT_NAME}
|
|
DESTINATION bin
|
|
COMPONENT omnitrace-examples)
|
|
endif()
|