From c4c53418f8a63330fc69ccff2ef3719300bc645c Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:24:04 +0200 Subject: [PATCH] sqtt: comment out flaky rocprof timestamp assert (#15432) * comment out rocprof assert, add new assert * better than > 0 assert * string --- test/amd/test_sqtt_examples.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/amd/test_sqtt_examples.py b/test/amd/test_sqtt_examples.py index dcdf2a23d3..b3ed48e48e 100644 --- a/test/amd/test_sqtt_examples.py +++ b/test/amd/test_sqtt_examples.py @@ -183,11 +183,18 @@ class SQTTExamplesTestBase(unittest.TestCase): our_waves: list[tuple[int, int]] = [] for event in events: wave_starts: dict[tuple[int, int, int], int] = {} + first_timestamp:int|None = None for p in decode(event.blob): + if first_timestamp is None: first_timestamp = p._time if isinstance(p, (WAVESTART, CDNA_WAVESTART, WAVESTART_RDNA4)): wave_starts[(p.wave, p.simd, p.cu)] = p._time elif isinstance(p, (WAVEEND, CDNA_WAVEEND)) and (key := (p.wave, p.simd, p.cu)) in wave_starts: our_waves.append((wave_starts[key], p._time)) - self.assertEqual(sorted(our_waves), sorted(roc_waves), f"wave times mismatch in {name}") + for st in wave_starts.values(): + self.assertGreater(st, first_timestamp, "wave start must be after the first packet") + # rocprof fails non deterministically and gives inaccurate timestamps. + #self.assertEqual(sorted(our_waves), sorted(roc_waves), f"wave times mismatch in {name}") + for st, et in our_waves: + self.assertGreater(et, st, "wave end must be after start") def test_rocprof_inst_times_match(self): """Instruction times must match rocprof exactly (excluding s_endpgm)."""