Skip to content

Commit c4f0fbb

Browse files
committed
Make choices randomly
1 parent 55ef828 commit c4f0fbb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/tpp-tune/tpp-tune.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44
from pathlib import Path
55
from typing import Union, Sequence, Dict
6-
6+
import random
77

88
# Enable automagically finding TPP-MLIR's python modules (which include
99
# and extend MLIR's Python bindings).
@@ -30,7 +30,7 @@ def wrapper(op: Union[ir.OpView, ir.Operation]):
3030

3131
def autotune(choices: Dict[str, Sequence[ir.Attribute]]) -> Dict[str, ir.Attribute]:
3232
# Aint tuning easy!!
33-
return {key: values[0] for key, values in choices.items()}
33+
return {key: random.choice(values) for key, values in choices.items()}
3434

3535

3636
file = sys.stdin

0 commit comments

Comments
 (0)