Skip to content

Commit 5557e05

Browse files
hunhoffeclaude
andcommitted
[dyn-seq P0a] Drop untested token test-pass arm; pin non-token-await skip
Two test-coverage fixes: - Removed the verifyTokenBalance call from the aie-test-runtime-bd-liveness test pass. It duplicated the emission the real aie-assign-runtime-sequence-bd-ids pass already produces, and no test exercised it (all TCT diagnostics are pinned through the real pass). The liveness test pass keeps emitting its own remarks. - Added good-tct-nontoken-await-ignored to pin the load-bearing rule that an await of a non-issue_token task does not trip token-balance verification (it is governed by the separate per-op check in AIEDMATasksToNPU). This is why every pre-existing design stays accepted; the test guards against a future regression that would start rejecting them. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 922ba78 commit 5557e05

2 files changed

Lines changed: 39 additions & 5 deletions

File tree

lib/Dialect/AIEX/Transforms/AIERuntimeBdLiveness.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,11 +622,6 @@ struct AIETestRuntimeBdLivenessPass
622622
<< kv.first.first << "," << kv.first.second
623623
<< ") peak=" << kv.second;
624624
});
625-
626-
// Token-balance verification (emits an op-error at each offending await /
627-
// loop; reported here so FileCheck can pin the diagnostics).
628-
getOperation().walk(
629-
[&](AIE::RuntimeSequenceOp seq) { (void)verifyTokenBalance(seq); });
630625
}
631626
};
632627
} // namespace
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
3+
// See https://llvm.org/LICENSE.txt for license information.
4+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5+
//
6+
// Copyright (C) 2026 Advanced Micro Devices, Inc.
7+
8+
// RUN: aie-opt --aie-assign-runtime-sequence-bd-ids %s | FileCheck %s
9+
10+
// Token-balance verification reasons only about issue_token tasks. An await of
11+
// a task that does NOT issue a token produces no `npu.sync` token consume that
12+
// this check models -- it is governed instead by the separate per-op check in
13+
// AIEDMATasksToNPU ("cannot wait on a BD not configured to issue a token"). So
14+
// such an await, even inside a loop with no matching produce, must NOT trip the
15+
// token-balance "blocks forever" diagnostic. This pins that skip: every
16+
// pre-existing design (none of which set issue_token) stays accepted. The await
17+
// here is in a loop with no token-issuing start -- it would be flagged if the
18+
// non-token skip regressed.
19+
20+
// CHECK-LABEL: @nontoken_await_ignored
21+
// CHECK-NOT: task-completion token
22+
module {
23+
aie.device(npu2) {
24+
%tile_0_0 = aie.tile(0, 0)
25+
aie.runtime_sequence @nontoken_await_ignored(%arg0: memref<8xi16>) {
26+
%c0 = arith.constant 0 : index
27+
%c1 = arith.constant 1 : index
28+
%c4 = arith.constant 4 : index
29+
scf.for %i = %c0 to %c4 step %c1 {
30+
%t = aiex.dma_configure_task(%tile_0_0, MM2S, 0) {
31+
aie.dma_bd(%arg0 : memref<8xi16>, 0, 8)
32+
aie.end
33+
}
34+
aiex.dma_start_task(%t)
35+
aiex.dma_await_task(%t)
36+
}
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)