SWDEV-409155: Fixing tests for att/pmc
Change-Id: I036f45502e6ff18518dcdb954161d09ce3546fe0
[ROCm/rocprofiler commit: b8b870328b]
Bu işleme şunda yer alıyor:
@@ -307,7 +307,7 @@ Example for file plugin output:
|
||||
- Added Plugin Versioning way in rocprofv2. See README for more details.
|
||||
- Added --version in the rocprof and rocprofv2 to be able to see the current rocprof/v2 version along with ROCm version information.
|
||||
|
||||
## ROCprofiler for rocm 6.2
|
||||
## ROCprofiler for rocm 6.1
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ class PCTranslator:
|
||||
symbol = "Unkown symbol at 0x" + hex(addr)
|
||||
|
||||
last_line = self.raw_code[-1]
|
||||
newline = ['; ' + symbol, 100, last_line[2], 0, last_line[4], last_line[5], -1, 0, 0]
|
||||
newline = ['; ' + symbol, 100, last_line[2], 0, last_line[4], last_line[5], 0, 0, 0]
|
||||
self.raw_code.append(newline)
|
||||
|
||||
def getcode(self, addr):
|
||||
@@ -355,7 +355,7 @@ def stitch(insts, raw_code, jumps, gfxv, bIsAuto, codeservice):
|
||||
else:
|
||||
line = 0
|
||||
lineincrement = 1
|
||||
watchlist = RegisterWatchList(labels=labels, code=code, jump_map=jump_map)
|
||||
watchlist = RegisterWatchList(labels=labels, code=code, jump_map=jump_map, insts=insts)
|
||||
|
||||
N = len(insts)
|
||||
|
||||
@@ -381,7 +381,9 @@ def stitch(insts, raw_code, jumps, gfxv, bIsAuto, codeservice):
|
||||
elif 'scratch_' in as_line[0]:
|
||||
watchlist.scratch(as_line[0])
|
||||
|
||||
if as_line[1] == GETPC:
|
||||
if as_line[1] == DONT_KNOW:
|
||||
matched = False
|
||||
elif as_line[1] == GETPC:
|
||||
try:
|
||||
watchlist.getpc(as_line[0], watchlist.getcode(next)[0])
|
||||
matched = inst.type in [SALU, JUMP]
|
||||
@@ -538,20 +540,21 @@ def stitch(insts, raw_code, jumps, gfxv, bIsAuto, codeservice):
|
||||
print('WARNING: Parsing terminated at:', as_line)
|
||||
break
|
||||
|
||||
if matched:
|
||||
inst.asmline = reverse_map[line]
|
||||
result.append(inst)
|
||||
i += 1
|
||||
num_failed_stitches = 0
|
||||
elif inst.type == IMMED and line != next and (not bGFX9 or 's_barrier' in as_line[0]):
|
||||
skipped_immed += 1
|
||||
inst.asmline = reverse_map[line]
|
||||
result.append(inst)
|
||||
if 's_barrier' in as_line[0]:
|
||||
next = line + lineincrement
|
||||
i += 1
|
||||
else:
|
||||
num_failed_stitches += 1
|
||||
if as_line[1] != DONT_KNOW:
|
||||
if matched:
|
||||
inst.asmline = reverse_map[line]
|
||||
result.append(inst)
|
||||
i += 1
|
||||
num_failed_stitches = 0
|
||||
elif inst.type == IMMED and line != next and (not bGFX9 or 's_barrier' in as_line[0]):
|
||||
skipped_immed += 1
|
||||
inst.asmline = reverse_map[line]
|
||||
result.append(inst)
|
||||
if 's_barrier' in as_line[0]:
|
||||
next = line + lineincrement
|
||||
i += 1
|
||||
else:
|
||||
num_failed_stitches += 1
|
||||
|
||||
maxline = max(reverse_map[line], maxline)
|
||||
line = next
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ add_test(
|
||||
${PROJECT_BINARY_DIR}/rocprofv2 -i
|
||||
${PROJECT_BINARY_DIR}/tests-v2/featuretests/profiler/apps/goldentraces/att_vadd.txt
|
||||
-d /tmp/tests-v2/att/ -o /tmp/tests-v2/att/vadd
|
||||
--plugin att auto --mode csv tests-v2/featuretests/profiler/apps/att_vectoradd.cpp
|
||||
--plugin att auto --mode csv tests-v2/featuretests/profiler/apps/att_vectoradd
|
||||
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}")
|
||||
|
||||
set_tests_properties(
|
||||
@@ -26,6 +26,6 @@ set_tests_properties(
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Test Passed"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"Test Failed"
|
||||
"AssertionError"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"Skipped")
|
||||
|
||||
+1
-1
@@ -57,6 +57,6 @@ set_tests_properties(
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Test Passed"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"Test Failed"
|
||||
"AssertionError"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"Skipped")
|
||||
|
||||
+1
-1
@@ -27,6 +27,6 @@ set_tests_properties(
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Test Passed"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"Test Failed"
|
||||
"AssertionError"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"Skipped")
|
||||
|
||||
@@ -6,7 +6,7 @@ MAX_WAVE_SIZE = 64
|
||||
MAXIMUM_ATT_HITS = 256*128//MAX_WAVE_SIZE//MAX_CU
|
||||
|
||||
kernel_name = "vectoradd_att"
|
||||
csv_filename = "att_output_" + kernel_name + "_v0.csv"
|
||||
csv_filename = "vadd_" + kernel_name + "_v0.csv"
|
||||
output_folder = "/tmp/tests-v2/att"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ def test_hitcount(csv):
|
||||
|
||||
|
||||
def test_addr(csv):
|
||||
addrs = np.array([int(addr, 16) for addr in csv['Addr'] if len(addr) != 0 and addr[0] != '-'])
|
||||
addrs = np.array([int(addr, 16) for addr in csv['Addr'] if addr != '0x0'])
|
||||
print('addrs', addrs)
|
||||
assert(addrs.max() - addrs.min() > 32) # 32 bytes is a safe minimum value
|
||||
assert(addrs.max() - addrs.min() < 2**24) # Kernels are not anywhere near that large
|
||||
@@ -69,4 +69,4 @@ if __name__ == "__main__":
|
||||
test_mean_cycles(csv)
|
||||
test_memory_cycles(csv)
|
||||
|
||||
print("All ATT correctness tests passed.")
|
||||
print("Test Passed: All ATT correctness tests passed.")
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle