Fix async memory copy validation tests (#182)
* Fix async copy validation test - make the async copy tracing test work regardless of however many HSA memory copies the HIP memory copy decomposes into * Fix rocprofv3 memory copy tests * Fix compilation support for hipGraphBatchMemOpNodeGetParams * Fix rocprofv3-test-summary-*-validate --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
@@ -161,7 +161,9 @@ def test_memory_copy_json_trace(json_data):
|
||||
return agent
|
||||
return None
|
||||
|
||||
assert len(memory_copy_data) == 12
|
||||
# two threads * two directions
|
||||
assert len(memory_copy_data) >= (2 * 2), f"{memory_copy_data}"
|
||||
assert (len(memory_copy_data) % (2 * 2)) == 0, f"{memory_copy_data}"
|
||||
|
||||
for row in memory_copy_data:
|
||||
src_agent = get_agent(row["src_agent_id"])
|
||||
|
||||
@@ -137,7 +137,9 @@ def test_memory_copy_trace(json_data):
|
||||
return agent
|
||||
return None
|
||||
|
||||
assert len(memory_copy_data) == 12
|
||||
# two threads * two directions
|
||||
assert len(memory_copy_data) >= (2 * 2), f"{memory_copy_data}"
|
||||
assert (len(memory_copy_data) % (2 * 2)) == 0, f"{memory_copy_data}"
|
||||
|
||||
for row in memory_copy_data:
|
||||
src_agent = get_agent(row["src_agent_id"])
|
||||
@@ -209,7 +211,9 @@ def test_summary_data(json_data):
|
||||
elif itr.domain == "HIP_API":
|
||||
assert itr.stats.count >= 2130 and itr.stats.count <= 2150
|
||||
elif itr.domain == "MEMORY_COPY":
|
||||
assert itr.stats.count == 12
|
||||
# two threads + two memory copies (H2D + D2H).
|
||||
# HIP may decompose memory copies into more than one HSA memory copy
|
||||
assert itr.stats.count >= 4 and (itr.stats.count % 4) == 0
|
||||
elif itr.domain == "MEMORY_ALLOCATION":
|
||||
assert itr.stats.count >= 10 and itr.stats.count <= 30
|
||||
elif itr.domain == "MARKER_API":
|
||||
|
||||
@@ -255,7 +255,9 @@ def test_memory_copy_json_trace(json_data):
|
||||
return agent
|
||||
return None
|
||||
|
||||
assert len(memory_copy_data) == 2
|
||||
# one threads * two directions
|
||||
assert len(memory_copy_data) >= 2, f"{memory_copy_data}"
|
||||
assert (len(memory_copy_data) % 2) == 0, f"{memory_copy_data}"
|
||||
|
||||
def test_row(idx, direction):
|
||||
assert direction in ("MEMORY_COPY_HOST_TO_DEVICE", "MEMORY_COPY_DEVICE_TO_HOST")
|
||||
|
||||
Reference in New Issue
Block a user