Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions p-isa_tools/kerngen/kerngraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@
from kernel_optimization.loops import loop_interchange
from const.options import LoopKey
from pisa_generators.basic import mixed_to_pisa_ops
from high_parser.config import Config


def parse_args():
"""Parse arguments from the commandline"""
parser = argparse.ArgumentParser(description="Kernel Graph Parser")
parser.add_argument("-d", "--debug", action="store_true", help="Enable Debug Print")
parser.add_argument(
"-l", "--legacy", action="store_true", help="Enable Legacy Mode"
)
parser.add_argument(
"-t",
"--target",
Expand Down Expand Up @@ -85,6 +89,7 @@ def main(args):
"""Main function to read input and parse each line with KernelParser."""
input_lines = sys.stdin.read().strip().splitlines()
valid_kernels = []
Config.legacy_mode = args.legacy

for line in input_lines:
try:
Expand Down