Files
rocm-systems/source/lib/rocprofiler-sdk-tool/CMakeLists.txt
T
Jonathan R. Madsen 16d535ef48 rocprofv3 OTF2 Output Support (#995)
* CMake support for OTF2 library

* Preliminary OTF2 generation implementation

* Completed OTF2 Support

- HSA API
- HIP API
- Marker API
- Async Memory Copies
- Kernel Dispatch

* Update lib/rocprofiler-sdk-tool/generateOTF2.cpp

- fix location type for dispatches

* Testing for OTF2 output

* Add OTF2 to requirements.txt

* Update lib/rocprofiler-sdk-tool/generateOTF2.cpp

- fix getting kernel name

* OTF2 testing with rocprofv3/tracing-hip-in-libraries

* Format external/otf2/CMakeLists.txt

* Update external/otf2/CMakeLists.txt

- guard CMP0135 for cmake < 3.24

* Update lib/rocprofiler-sdk-tool/generateOTF2.cpp

- fix duplicate string ref issue

* Update lib/rocprofiler-sdk-tool/generateOTF2.cpp

- fix header includes

* Update CI workflow

- sudo install pypi requirements for core-rpm for $HOME/.local installs

* Update pytest_utils/otf2_reader.py

- modifications for reading trace

* Update pytest_utils/otf2_reader.py

- misc cleanup

* Update CI workflow

- fix installer artifact naming

* Update pytest_utils/otf2_reader.py

- handle slightly overlapping kernel timestamps for MI300

* OTF2 attributes for category

* Testing with OTF2Reader category attributes

* Fix memory leak in OTF2 generation

- leaking OTF2_AttributeList
2024-07-30 19:57:19 -05:00

81 lines
2.3 KiB
CMake

#
# Tool library used by rocprofiler
#
rocprofiler_activate_clang_tidy()
set(TOOL_HEADERS
buffered_output.hpp
config.hpp
csv.hpp
domain_type.hpp
generateCSV.hpp
generateJSON.hpp
generateOTF2.hpp
generatePerfetto.hpp
helper.hpp
output_file.hpp
statistics.hpp
tmp_file_buffer.hpp
tmp_file.hpp)
set(TOOL_SOURCES
config.cpp
domain_type.cpp
generateCSV.cpp
generateJSON.cpp
generateOTF2.cpp
generatePerfetto.cpp
helper.cpp
main.c
output_file.cpp
tmp_file_buffer.cpp
tmp_file.cpp
tool.cpp)
add_library(rocprofiler-sdk-tool SHARED)
target_sources(rocprofiler-sdk-tool PRIVATE ${TOOL_SOURCES} ${TOOL_HEADERS})
add_subdirectory(plugins)
target_link_libraries(
rocprofiler-sdk-tool
PRIVATE rocprofiler-sdk::rocprofiler-shared-library
rocprofiler-sdk::rocprofiler-headers
rocprofiler-sdk::rocprofiler-build-flags
rocprofiler-sdk::rocprofiler-memcheck
rocprofiler-sdk::rocprofiler-common-library
rocprofiler-sdk::rocprofiler-cereal
rocprofiler-sdk::rocprofiler-perfetto
rocprofiler-sdk::rocprofiler-otf2)
set_target_properties(
rocprofiler-sdk-tool
PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
BUILD_RPATH "\$ORIGIN:\$ORIGIN/.."
INSTALL_RPATH "\$ORIGIN:\$ORIGIN/..")
install(
TARGETS rocprofiler-sdk-tool
DESTINATION ${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)
add_executable(rocprofv3-trigger-list-metrics)
target_sources(rocprofv3-trigger-list-metrics PRIVATE rocprofv3_trigger_list_metrics.cpp)
target_link_libraries(rocprofv3-trigger-list-metrics
PRIVATE rocprofiler-sdk::rocprofiler-hsa-runtime)
set_target_properties(
rocprofv3-trigger-list-metrics
PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk)
install(
TARGETS rocprofv3-trigger-list-metrics
DESTINATION ${CMAKE_INSTALL_LIBDIR}/rocprofiler-sdk
COMPONENT tools
EXPORT rocprofiler-sdk-tool-targets)