Skip to content

Commit ac19f3e

Browse files
Bug Fix - Context Label not always set as a string (#98)
1 parent d3f0a5c commit ac19f3e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

p-isa_tools/kerngen/high_parser/parser.py

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 parsing isa commands"""
@@ -68,7 +68,7 @@ def get_pisa_ops(self) -> Iterator[list[PIsaOp] | None]:
6868
if Config.legacy_mode is True:
6969
for command in commands:
7070
if isinstance(command, HighOp) and hasattr(command, "context"):
71-
command.context.label = self.context.ntt_stages
71+
command.context.label = str(self.context.ntt_stages)
7272

7373
return (
7474
command.to_pisa() if isinstance(command, HighOp) else None

p-isa_tools/kerngen/kernel_parser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def parse_context(context_str: str) -> KernelContext:
5454
current_rns=int(context_match.group("current_rns")),
5555
max_rns=int(context_match.group("key_rns")) - 1,
5656
),
57-
label=context_match.group("label"),
57+
label=str(context_match.group("label")),
5858
)
5959

6060
@staticmethod

0 commit comments

Comments
 (0)