Skip to content

Commit

Permalink
misc: Typos and edits
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed May 20, 2024
1 parent 7d16e7a commit 00f17ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions devito/ir/ietxdsl/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,13 @@ def convert(self, eqs: Iterable[Eq], **kwargs) -> builtin.ModuleOp:
xdsl_func.body.block.args[i].name_hint = f"{f.name}_vec{t}"
self.function_args[(f, t)] = xdsl_func.body.block.args[i]
for i, f in enumerate(self.functions):
xdsl_func.body.block.args[len(self.time_buffers)+i].name_hint = f"{f.name}_vec" # noqa
xdsl_func.body.block.args[len(self.time_buffers) + i].name_hint = f"{f.name}_vec" # noqa
# tofix what is this 0 in [(f, 0)]
self.function_args[(f, 0)] = xdsl_func.body.block.args[len(self.time_buffers) + i] # noqa

# Union operation?
self.function_values |= self.function_args
print(self.function_values)
# print(self.function_values)

# Move on to generate the function body
with ImplicitBuilder(xdsl_func.body.block):
Expand Down Expand Up @@ -555,7 +557,7 @@ def match_and_rewrite(self, op: iet_ssa.LoadSymbolic, rewriter: PatternRewriter,
)


class _LowerLoadSymbolidToFuncArgs(RewritePattern):
class _LowerLoadSymbolicToFuncArgs(RewritePattern):

func_to_args: dict[func.FuncOp, dict[str, SSAValue]]

Expand Down Expand Up @@ -596,7 +598,7 @@ def finalize_module_with_globals(module: builtin.ModuleOp, known_symbols: dict[s
"""
patterns = [
_InsertSymbolicConstants(known_symbols),
_LowerLoadSymbolidToFuncArgs(),
_LowerLoadSymbolicToFuncArgs(),
]
rewriter = GreedyRewritePatternApplier(patterns)
PatternRewriteWalker(rewriter).rewrite_module(module)
Expand Down

0 comments on commit 00f17ac

Please sign in to comment.