099ac7c72d
* Enabling codeobj and thread trace samples * Updating aqlprofile_v2 header * Codeobj and thread trace samples with output log files * Fixing clang format * Cmake formatting * Adding coverage to codeobj * Comment trace sample * Adding ATT Parser API * Fixing forwarding to aqlprofile * Clang formatting * Clang tidy * Adding option to print memory kernels * Clang format * Remove default from switch case * Separating client/main on codeobj sample for ASAn * Formatting * Gbaraldi/att tool rebase (#801) * Enabling codeobj and thread trace samples * Updating aqlprofile_v2 header * Codeobj and thread trace samples with output log files * Fixing clang format * Cmake formatting * Adding coverage to codeobj * Comment trace sample * Removing python from workflow * Adding ATT Parser API * Fixing forwarding to aqlprofile * Clang formatting * Clang tidy * Adding option to print memory kernels * Clang format * Remove default from switch case * Separating client/main on codeobj sample for ASAn * Formatting * Enabling codeobj and thread trace samples * Updating aqlprofile_v2 header * Codeobj and thread trace samples with output log files * Fixing clang format * Cmake formatting * Adding coverage to codeobj * Comment trace sample * Adding ATT Parser API * Fixing forwarding to aqlprofile * Clang formatting * Clang tidy * Adding option to print memory kernels * Clang format * Remove default from switch case * Separating client/main on codeobj sample for ASAn * Formatting * Fix codeobj library * Allow thread trace in parallel with other service * Zeroing the HSA signals * Adding exception wrappers in ATT sample * Removed force configure * Remove force configure from ISA decode * Removing codecov flag * Gbaraldi/att tool tests (#828) * Adding tests for codeobj ISA decode * Adding ATT tests * Adding ATT integration tests * Formatting * Changing codeobj binary extension * Renaming codeobj library spaces * Fixing samples * Formatting * Formatting * Fixing int test * Fixing linker error * Fixing memory fault * Moving kernel ot inside namespace * ASAN linking fix * Removing unecessary headers * Formatting * Fixing target_cu * Remove codeobj binary * Revert "Remove codeobj binary" This reverts commit 7d286f89d8096bc36925cd79cd742a5e6d10d179. * Enable memory snapshot * adding comgr --------- Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
54 строки
1.8 KiB
CMake
54 строки
1.8 KiB
CMake
#
|
|
#
|
|
#
|
|
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
|
|
|
if(NOT CMAKE_HIP_COMPILER)
|
|
find_program(
|
|
amdclangpp_EXECUTABLE
|
|
NAMES amdclang++
|
|
HINTS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATHS ${ROCM_PATH} ENV ROCM_PATH /opt/rocm
|
|
PATH_SUFFIXES bin llvm/bin NO_CACHE)
|
|
mark_as_advanced(amdclangpp_EXECUTABLE)
|
|
|
|
if(amdclangpp_EXECUTABLE)
|
|
set(CMAKE_HIP_COMPILER "${amdclangpp_EXECUTABLE}")
|
|
endif()
|
|
endif()
|
|
|
|
project(rocprofiler-sdk-samples-code-object-isa-decode LANGUAGES CXX HIP)
|
|
|
|
foreach(_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
|
|
if("${CMAKE_HIP_FLAGS_${_TYPE}}" STREQUAL "")
|
|
set(CMAKE_HIP_FLAGS_${_TYPE} "${CMAKE_CXX_FLAGS_${_TYPE}}")
|
|
endif()
|
|
endforeach()
|
|
|
|
find_package(rocprofiler-sdk REQUIRED)
|
|
find_package(amd_comgr REQUIRED)
|
|
|
|
add_library(code-object-isa-decode-client SHARED)
|
|
target_sources(code-object-isa-decode-client PRIVATE client.cpp)
|
|
set_source_files_properties(main.cpp PROPERTIES LANGUAGE HIP)
|
|
set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-g")
|
|
|
|
target_link_libraries(
|
|
code-object-isa-decode-client
|
|
PRIVATE rocprofiler::samples-common-library rocprofiler-sdk-codeobj
|
|
rocprofiler::rocprofiler amd_comgr dw)
|
|
|
|
rocprofiler_samples_get_preload_env(PRELOAD_ENV code-object-isa-decode-client)
|
|
|
|
add_executable(code-object-isa-decode)
|
|
target_sources(code-object-isa-decode PRIVATE main.cpp)
|
|
target_link_libraries(code-object-isa-decode PRIVATE code-object-isa-decode-client
|
|
rocprofiler::samples-build-flags)
|
|
|
|
add_test(NAME code-object-isa-decode COMMAND $<TARGET_FILE:code-object-isa-decode>)
|
|
|
|
set_tests_properties(
|
|
code-object-isa-decode
|
|
PROPERTIES TIMEOUT 45 LABELS "samples" ENVIRONMENT "${PRELOAD_ENV}"
|
|
FAIL_REGULAR_EXPRESSION "threw an exception")
|