Skip to content

Commit

Permalink
Fixup for multiple entry point functions.
Browse files Browse the repository at this point in the history
Signed-off-by: Ean Garvey <garveyej@gmail.com>

Fix formatting

Use symbol table lookup for function names in metadata pass.

Signed-off-by: Ean Garvey <garveyej@gmail.com>
  • Loading branch information
monorimet authored and eagarvey-amd committed Jul 10, 2024
1 parent cbdbc40 commit a77192a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shark_turbine/transforms/general/add_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def parse_metadata_dict(metadata_dict: dict) -> DictAttr:

metadata_dict_attr = parse_metadata_dict(self.inp_metadata)
for func_op in self.funcs:
if func_op.op.attributes[1].attr.value == self.func_name:
ir_func_symbol = SymbolTable.get_symbol_name(func_op.op)
ir_func_symbol_name = StringAttr(ir_func_symbol).value
if ir_func_symbol_name == self.func_name:
func_op.op.attributes["iree.reflection"] = metadata_dict_attr
return self.mlir_module

Expand Down

0 comments on commit a77192a

Please sign in to comment.