From 35cb8f09097f49284404a30a81b7a1ad055767eb Mon Sep 17 00:00:00 2001 From: Jonghwa Lee Date: Thu, 19 Dec 2024 15:07:27 +0900 Subject: [PATCH] [tools/mec] Show real operator name of custom op It fixes to show real operator name of custom op node. ONE-DCO-1.0-Signed-off-by: Jonghwa Lee --- tools/model_explorer_circle/src/model_explorer_circle/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/model_explorer_circle/src/model_explorer_circle/main.py b/tools/model_explorer_circle/src/model_explorer_circle/main.py index c1759856a03..dde38d93a85 100644 --- a/tools/model_explorer_circle/src/model_explorer_circle/main.py +++ b/tools/model_explorer_circle/src/model_explorer_circle/main.py @@ -56,6 +56,8 @@ def load_model(self, model_path: str) -> None: def get_opcode_name(self, opcode_index: int) -> str: """Convert the opcode to its name.""" opcode = self.model.operatorCodes[opcode_index].deprecatedBuiltinCode + if opcode == circle_schema.BuiltinOperator.CUSTOM: + return self.model.operatorCodes[opcode_index].customCode.decode('utf-8') if opcode == circle_schema.BuiltinOperator.PLACEHOLDER_FOR_GREATER_OP_CODES: opcode = self.model.operatorCodes[opcode_index].builtinCode assert (opcode >= 127)