Skip to content

Commit

Permalink
String description at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
erick-xanadu committed Jan 9, 2025
1 parent 0f876ab commit 95ab10c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/catalyst/passes/pass_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ def __init__(self, name: str, *options: list[str], **valued_options: dict[str, s

def get_options(self):
"""
Stringify options according to what mlir-opt expects.
ApplyRegisteredPassOp expects options to be a single StringAttr
which follows the same format as the one used with mlir-opt.
Expand All @@ -281,7 +283,7 @@ def get_options(self):
https://mlir.llvm.org/docs/Tutorials/MlirOpt/#running-a-pass-with-options
However, experimentally we found that single-options also work without values.
Experimentally we found that single-options also work without values.
"""
retval = " ".join(f"{str(option)}" for option in self.options)
retval2 = " ".join(f"{str(key)}={str(value)}" for key, value in self.valued_options.items())
Expand Down

0 comments on commit 95ab10c

Please sign in to comment.