Files
rocm-systems/tests/rocprofv3/memory-allocation/CMakeLists.txt
T
Trowbridge, Ian 79006bb896 SWDEV-492625 memory free functions (#11)
* SWDEV-492625: Track free memory HSA functions to help determine total amount of memory allocated on the system at any one time

* Minor fixes to address comments

* Update allocation size description

* Moved get function back to specialization, minor typo fixes

* Removed memory_operation_type field, removed memory_pool allocation enum, converted starting address to hex string for json format.

* Made conversion to hex_string a function, changed address to use union rocprofiler_address_t type, changed VMEM descriptors

* Removed as_hex from the global namespace

* Formatting

* Removed TRACK_EVENT for memory allocation, now TRACK_COUNTER for memory allocation is being performed

* Check if address was recorded before retrieving allocation size in generate Perfetto

* Formatting

* Update source/lib/output/generatePerfetto.cpp

* Explicitly disable app-abort tests

* Remove excluding app-abort test from workflow CI

- redundant bc these tests are explicitly marked as disabled now

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2024-12-06 00:05:30 -06:00

46 lines
1.6 KiB
CMake

#
#
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
project(
rocprofiler-tests-rocprofv3-memory-allocation-tracing
LANGUAGES CXX
VERSION 0.0.0)
find_package(rocprofiler-sdk REQUIRED)
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
string(REPLACE "LD_PRELOAD=" "ROCPROF_PRELOAD=" PRELOAD_ENV
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
set(memory-allocation-tracing-env "${PRELOAD_ENV}")
add_test(
NAME rocprofv3-test-memory-allocation-tracing-execute
COMMAND
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --memory-allocation-trace -d
${CMAKE_CURRENT_BINARY_DIR}/%tag%-trace -o out --output-format json otf2
--log-level env -- $<TARGET_FILE:hsa-memory-allocation>)
set_tests_properties(
rocprofv3-test-memory-allocation-tracing-execute
PROPERTIES TIMEOUT 45 LABELS "integration-tests" ENVIRONMENT
"${memory-allocation-tracing-env}" FAIL_REGULAR_EXPRESSION
"threw an exception")
add_test(
NAME rocprofv3-test-memory-allocation-tracing-validate
COMMAND
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --json-input
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.json
--otf2-input
${CMAKE_CURRENT_BINARY_DIR}/hsa-memory-allocation-trace/out_results.otf2)
set_tests_properties(
rocprofv3-test-memory-allocation-tracing-validate
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DEPENDS
rocprofv3-test-memory-allocation-tracing-execute FAIL_REGULAR_EXPRESSION
"AssertionError")