Skip to content

Commit

Permalink
Add class for args.mode
Browse files Browse the repository at this point in the history
  • Loading branch information
RattataKing committed Aug 12, 2024
1 parent e9e5d0f commit 5abb073
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tuning/autotune.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ def get_exe_format(self, path: Path) -> str:
return f"./{path.as_posix()}"


class CompilationMode(Enum):
DEFAULT = "default"
WINOGRAD = "winograd"


@dataclass
class TaskTuple:
args: argparse.Namespace
Expand Down Expand Up @@ -353,7 +358,7 @@ def parse_arguments() -> argparse.Namespace:

# Required arguments
parser.add_argument(
"mode", choices=["default", "winograd"], help="Compilation mode"
"mode", choices=[m.value for m in CompilationMode], help="Compilation mode"
)
parser.add_argument(
"input_file", type=Path, help="Path to the input benchmark file (.mlir)"
Expand Down

0 comments on commit 5abb073

Please sign in to comment.