Skip to content

Commit b38497e

Browse files
Kerngraph New Feature - Add command line option for legacy mode output (#99)
1 parent ac19f3e commit b38497e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

p-isa_tools/kerngen/kerngraph.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@
3636
from kernel_optimization.loops import loop_interchange
3737
from const.options import LoopKey
3838
from pisa_generators.basic import mixed_to_pisa_ops
39+
from high_parser.config import Config
3940

4041

4142
def parse_args():
4243
"""Parse arguments from the commandline"""
4344
parser = argparse.ArgumentParser(description="Kernel Graph Parser")
4445
parser.add_argument("-d", "--debug", action="store_true", help="Enable Debug Print")
46+
parser.add_argument(
47+
"-l", "--legacy", action="store_true", help="Enable Legacy Mode"
48+
)
4549
parser.add_argument(
4650
"-t",
4751
"--target",
@@ -85,6 +89,7 @@ def main(args):
8589
"""Main function to read input and parse each line with KernelParser."""
8690
input_lines = sys.stdin.read().strip().splitlines()
8791
valid_kernels = []
92+
Config.legacy_mode = args.legacy
8893

8994
for line in input_lines:
9095
try:

0 commit comments

Comments
 (0)