8c5399a68a
* Enable INFO logging on retried CI jobs
* Update lib/rocprofiler-sdk/async_copy.cpp
- rework active_signals
- make hsa_signal_t member variable
- remove sync from destructor
- replace _is_set with atomic counter
- timeout of 30 seconds hsa_signal_wait
- switch from relaxed to scacquire/screlease memory ordering
- improve logging and error handling
- destroy hsa signal in active_signals in async_fini
* Update lib/rocprofiler-sdk/async_copy.cpp
- active_signals::create
- change initial value of signal to 1 instead of value of completion signal
- change condition trigger of signal callback
* Update tests/counter-collection/validate.py
* Update lib/rocprofiler-sdk/async_copy.cpp
- improved logging
- fix hsa_signal_wait_scacquire_fn check
* Cleanup tests/lib/transpose/transpose.cpp
- remove huge comment block
* Appears to be working on MI200
Dependency Versions:
clr: f7b1398361 - compile mode: release
hsa-runtime: 4cd6c62f25dbbdbaa8580dd4ad8f388c98c508da - compile mode: RelWithDebug
* Update source/lib/rocprofiler-sdk/hsa/async_copy.cpp
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Format fix
---------
Co-authored-by: Benjamin Welton <bewelton@amd.com>
Co-authored-by: Ammar ELWazir <ammar.elwazir@amd.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ammar ELWazir <aelwazir@hpe6u-21.amd.com>
48 lines
1.4 KiB
Python
48 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import pytest
|
|
|
|
|
|
# helper function
|
|
def node_exists(name, data, min_len=1):
|
|
assert name in data
|
|
assert data[name] is not None
|
|
assert len(data[name]) >= min_len
|
|
|
|
|
|
def test_data_structure(input_data):
|
|
"""verify minimum amount of expected data is present"""
|
|
node_exists("rocprofiler-sdk-json-tool", input_data)
|
|
rocp_data = input_data
|
|
node_exists("names", rocp_data["rocprofiler-sdk-json-tool"]["buffer_records"])
|
|
node_exists(
|
|
"counter_collection", rocp_data["rocprofiler-sdk-json-tool"]["buffer_records"]
|
|
)
|
|
|
|
|
|
def test_counter_values(input_data):
|
|
data = input_data
|
|
agent_data = data["rocprofiler-sdk-json-tool"]["agents"]
|
|
counter_data = data["rocprofiler-sdk-json-tool"]["buffer_records"][
|
|
"counter_collection"
|
|
]
|
|
|
|
scaling_factor = 1
|
|
for itr in agent_data:
|
|
if itr["type"] == 2 and itr["wave_front_size"] > 0:
|
|
scaling_factor = 64 / itr["wave_front_size"]
|
|
break
|
|
|
|
for itr in counter_data:
|
|
value = itr["counter_value"]
|
|
if int(round(value, 0)) > 0:
|
|
assert int(round(value, 0)) == int(
|
|
round(1 * scaling_factor, 0)
|
|
), f"agent_data:\n{agent_data}\n\ncounter_data:\n{counter_data}"
|
|
|
|
|
|
if __name__ == "__main__":
|
|
exit_code = pytest.main(["-x", __file__] + sys.argv[1:])
|
|
sys.exit(exit_code)
|