Skip to content

Commit d80f2ba

Browse files
committed
Detect name collision
1 parent c4f0fbb commit d80f2ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/tpp-tune/tpp-tune.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def autotune(choices: Dict[str, Sequence[ir.Attribute]]) -> Dict[str, ir.Attribu
4646
@walker
4747
def choices_finder(op):
4848
if isinstance(op, transform_tune.TuneSelectOp):
49+
if op.name in choices:
50+
raise RuntimeError(f"options name collision: {op.name} used twice")
4951
choices[op.name] = tuple(op.options)
5052

5153
choices_finder(schedule.operation)

0 commit comments

Comments
 (0)