[rocprof-compute] Update Formatting (#671)
* updated rocprof-compute formatting * fixed ammolite peak variables in parser.py * format parser.py * update formatting rocprof_compute_base
This commit is contained in:
committato da
GitHub
parent
e9e98daf24
commit
5deeea71df
@@ -172,7 +172,9 @@ def get_num_pmc_file(output_dir):
|
||||
"""
|
||||
|
||||
perfmon_path = Path(output_dir) / "perfmon"
|
||||
return len([f for f in perfmon_path.iterdir() if f.is_file() and f.suffix == ".txt"])
|
||||
return len([
|
||||
f for f in perfmon_path.iterdir() if f.is_file() and f.suffix == ".txt"
|
||||
])
|
||||
|
||||
|
||||
# =============================================================================
|
||||
@@ -1769,8 +1771,18 @@ def test_v3_json_to_csv_complex_dispatch(tmp_path, monkeypatch):
|
||||
{
|
||||
"metadata": {"pid": 12345},
|
||||
"agents": [
|
||||
{"id": {"handle": 1}, "type": 2, "node_id": 0, "wave_front_size": 64},
|
||||
{"id": {"handle": 2}, "type": 2, "node_id": 1, "wave_front_size": 32},
|
||||
{
|
||||
"id": {"handle": 1},
|
||||
"type": 2,
|
||||
"node_id": 0,
|
||||
"wave_front_size": 64,
|
||||
},
|
||||
{
|
||||
"id": {"handle": 2},
|
||||
"type": 2,
|
||||
"node_id": 1,
|
||||
"wave_front_size": 32,
|
||||
},
|
||||
],
|
||||
"counters": [
|
||||
{
|
||||
@@ -1923,8 +1935,10 @@ def test_v3_json_to_csv_complex_dispatch(tmp_path, monkeypatch):
|
||||
|
||||
def test_v3_json_to_csv_missing_counters_handling(tmp_path, monkeypatch):
|
||||
"""
|
||||
Test v3_json_to_csv handles cases where different dispatches have different sets of counters.
|
||||
This addresses the DataFrame creation issue where arrays have different lengths.
|
||||
Test v3_json_to_csv handles cases where different
|
||||
dispatches have different sets of counters.
|
||||
This addresses the DataFrame creation issue
|
||||
where arrays have different lengths.
|
||||
|
||||
Args:
|
||||
tmp_path (pathlib.Path): Temporary directory for test files
|
||||
@@ -1936,7 +1950,12 @@ def test_v3_json_to_csv_missing_counters_handling(tmp_path, monkeypatch):
|
||||
{
|
||||
"metadata": {"pid": 12345},
|
||||
"agents": [
|
||||
{"id": {"handle": 1}, "type": 2, "node_id": 0, "wave_front_size": 64}
|
||||
{
|
||||
"id": {"handle": 1},
|
||||
"type": 2,
|
||||
"node_id": 0,
|
||||
"wave_front_size": 64,
|
||||
}
|
||||
],
|
||||
"counters": [
|
||||
{
|
||||
@@ -2072,7 +2091,8 @@ def test_v3_json_to_csv_missing_counters_handling(tmp_path, monkeypatch):
|
||||
except ValueError as e:
|
||||
if "All arrays must be of the same length" in str(e):
|
||||
pytest.skip(
|
||||
"v3_json_to_csv does not currently handle missing counters gracefully - arrays have different lengths"
|
||||
"v3_json_to_csv does not currently "
|
||||
"handle missing counters gracefully - arrays have different lengths"
|
||||
)
|
||||
else:
|
||||
raise
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user