Skip to content

Commit

Permalink
Fixup for multiple entry point functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
monorimet committed Jul 2, 2024
1 parent 3e678c7 commit f196208
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shark_turbine/transforms/general/add_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +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:
func_op.op.attributes["iree.reflection"] = metadata_dict_attr
for attr in func_op.op.attributes:
if isinstance(attr.attr, StringAttr) and attr.attr.value == self.func_name:
func_op.op.attributes["iree.reflection"] = metadata_dict_attr
return self.mlir_module


Expand Down

0 comments on commit f196208

Please sign in to comment.