93343034bc
* Initial support for RCCL
* OMNITRACE_USE_RCCLP + sampling tweaks
- also OMNITRACE_SAMPLING_KEEP_INTERNAL option
- minor modifications to sampling to use keep internal option + discard funlockfile
* Update docker and workflows to download RCCL
* Update CPack DEB with rocprofiler dependency
* Rework rccl into library and library/components folder
- add tpls/rccl/rccl/rccl.h
* Fix timemory includes
* rcclp inline definitions when disabled
* Tweaks to ubuntu-focal-external-rocm
- disable ompt
- enable building testing
* Tweaks to ubuntu-focal-external-rocm
- ctest exclude
* Tweak ubuntu-focal.yml
- remove source /.../setup-env.sh, replace with $GITHUB_ENV
* Fix ubuntu-focal-rocm + OMPI + root
* Improved rocm-smi error handling
- Recover from rocm-smi errors
- Disabling rocm-smi after recovering from errors
- Werror in developer mode
- Remove State::DelayedInit
- Add State::Disabled
* formatting
* Fix merge of OMNITRACE_SAMPLING_KEEP_INTERNAL
* Update RCCL include directory
- based on ROCm version we need with <rccl/rccl.h> or <rccl.h>
* RCCL Testing
- updated tests to use configuration files
- many tests generate a configuration file
- tests how have GPU option
- enable ncclCommCount, disable ncclGetVersion
- add testing for RCCLP via rccl-tests
- working directory of tests is PROJECT_BINARY_DIR
- add nccl/rccl functions to get_whole_function_names
- some clang compiler fixes
* Handle RCCL include w/o HIP
* RCCL requires HIP
* Update OMNITRACE_SAMPLING_CPUS for testing
* Update tests/CMakeLists.txt
* Debug settings
* Install MPI even when USE_MPI=OFF
* exclude printf
* skip mpi tests w/o USE_MPI or USE_MPI_HEADERS
* update ubuntu rocm workflow
* Fix configure env step for ubuntu rocm
[ROCm/rocprofiler-systems commit: 45be03906a]
73 lines
2.3 KiB
CMake
73 lines
2.3 KiB
CMake
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
|
|
|
|
project(omnitrace-transpose LANGUAGES CXX)
|
|
|
|
find_package(hip QUIET HINTS ${ROCmVersion_DIR} PATHS ${ROCmVersion_DIR})
|
|
|
|
find_program(
|
|
HIPCC_EXECUTABLE
|
|
NAMES hipcc
|
|
HINTS ${ROCmVersion_DIR} ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCmVersion_DIR} ${ROCM_PATH} ENV ROCM_PATH /opt/rocm NO_CACHE)
|
|
mark_as_advanced(HIPCC_EXECUTABLE)
|
|
|
|
if(NOT HIPCC_EXECUTABLE)
|
|
message(AUTHOR_WARNING "hipcc could not be found. Cannot build transpose target")
|
|
return()
|
|
endif()
|
|
|
|
if(NOT CMAKE_CXX_COMPILER_IS_HIPCC AND HIPCC_EXECUTABLE)
|
|
if(CMAKE_CXX_COMPILER STREQUAL HIPCC_EXECUTABLE OR "${CMAKE_CXX_COMPILER}" MATCHES
|
|
"hipcc")
|
|
set(CMAKE_CXX_COMPILER_IS_HIPCC
|
|
1
|
|
CACHE BOOL "HIP compiler")
|
|
endif()
|
|
endif()
|
|
|
|
if((NOT CMAKE_CXX_COMPILER_IS_HIPCC OR (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang"
|
|
AND NOT hip_FOUND))
|
|
AND (NOT COMMAND omnitrace_custom_compilation AND NOT HIPCC_EXECUTABLE))
|
|
message(AUTHOR_WARNING "transpose target could not be built")
|
|
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_ID MATCHES "Clang"
|
|
AND NOT CMAKE_CXX_COMPILER_IS_HIPCC
|
|
AND NOT HIPCC_EXECUTABLE)
|
|
target_link_libraries(
|
|
transpose
|
|
PRIVATE $<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-compile-options>
|
|
$<TARGET_NAME_IF_EXISTS:hip::host> $<TARGET_NAME_IF_EXISTS:hip::device>)
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
target_link_libraries(
|
|
transpose PRIVATE $<TARGET_NAME_IF_EXISTS:omnitrace::omnitrace-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_CXX_COMPILER_IS_HIPCC AND HIPCC_EXECUTABLE)
|
|
# defined in MacroUtilities.cmake
|
|
omnitrace_custom_compilation(COMPILER ${HIPCC_EXECUTABLE} TARGET transpose)
|
|
endif()
|
|
|
|
if(OMNITRACE_INSTALL_EXAMPLES)
|
|
install(
|
|
TARGETS transpose
|
|
DESTINATION bin
|
|
COMPONENT omnitrace-examples)
|
|
endif()
|