From 3eaf9f63ed0e441ec4b1d5a1905bb46becf9685d Mon Sep 17 00:00:00 2001 From: christopherngutierrez Date: Mon, 23 Jun 2025 16:32:22 -0700 Subject: [PATCH] Enables kerngraph support for NTT. --- p-isa_tools/kerngen/high_parser/config.py | 4 ++-- p-isa_tools/kerngen/kerngraph.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/p-isa_tools/kerngen/high_parser/config.py b/p-isa_tools/kerngen/high_parser/config.py index 60a70f97..40341061 100644 --- a/p-isa_tools/kerngen/high_parser/config.py +++ b/p-isa_tools/kerngen/high_parser/config.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 """Module for configuring the kernel generator""" @@ -7,4 +7,4 @@ class Config: """Class representing the configuration options""" - legacy_mode: bool + legacy_mode: bool = False diff --git a/p-isa_tools/kerngen/kerngraph.py b/p-isa_tools/kerngen/kerngraph.py index ce9d8763..e7343281 100755 --- a/p-isa_tools/kerngen/kerngraph.py +++ b/p-isa_tools/kerngen/kerngraph.py @@ -48,7 +48,14 @@ def parse_args(): nargs="*", default=[], # Composition high ops such are ntt, mod, and relin are not currently supported - choices=["add", "sub", "mul", "muli", "copy"], # currently supports single ops + choices=[ + "add", + "sub", + "mul", + "muli", + "copy", + "ntt", + ], # currently supports single ops help="List of high_op names", ) parser.add_argument( @@ -97,7 +104,7 @@ def main(args): ) for kernel in valid_kernels: if args.target and any( - target.capitalize() in str(kernel) for target in args.target + target.lower() in str(kernel).lower() for target in args.target ): kernel = loop_interchange( kernel.to_pisa(),