Skip to content

Commit d3f0a5c

Browse files
Kerngraph support for NTT op
Enables kerngraph support for NTT. Co-authored-by: Kylan Race <kylan.e.race@intel.com>
1 parent dba633d commit d3f0a5c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2024 Intel Corporation
1+
# Copyright (C) 2025 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

44
"""Module for configuring the kernel generator"""
@@ -7,4 +7,4 @@
77
class Config:
88
"""Class representing the configuration options"""
99

10-
legacy_mode: bool
10+
legacy_mode: bool = False

p-isa_tools/kerngen/kerngraph.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ def parse_args():
4848
nargs="*",
4949
default=[],
5050
# Composition high ops such are ntt, mod, and relin are not currently supported
51-
choices=["add", "sub", "mul", "muli", "copy"], # currently supports single ops
51+
choices=[
52+
"add",
53+
"sub",
54+
"mul",
55+
"muli",
56+
"copy",
57+
"ntt",
58+
], # currently supports single ops
5259
help="List of high_op names",
5360
)
5461
parser.add_argument(
@@ -97,7 +104,7 @@ def main(args):
97104
)
98105
for kernel in valid_kernels:
99106
if args.target and any(
100-
target.capitalize() in str(kernel) for target in args.target
107+
target.lower() in str(kernel).lower() for target in args.target
101108
):
102109
kernel = loop_interchange(
103110
kernel.to_pisa(),

0 commit comments

Comments
 (0)