Skip to content

Commit

Permalink
post-fix for bufferizeOp issue
Browse files Browse the repository at this point in the history
Signed-off-by: hanhanW <hanhan0912@gmail.com>
  • Loading branch information
hanhanW committed Feb 6, 2025
1 parent f206357 commit ec9220a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ module attributes { transform.with_named_sequence } {
%tensor_func = transform.structured.match ops{["func.func"]} in %variant_op : (!transform.any_op) -> !transform.any_op
transform.iree.eliminate_empty_tensors %tensor_func : (!transform.any_op) -> ()
%memref_func = transform.iree.bufferize %tensor_func : (!transform.any_op) -> !transform.any_op
%func_op_bufferized = transform.structured.match ops{["func.func"]} in %memref_func : (!transform.any_op) -> !transform.op<"func.func">
transform.apply_patterns to %func_op_bufferized {
transform.apply_patterns.canonicalization
} : !transform.op<"func.func">

// Annotate the exported function as already translated.
%none = transform.param.constant #iree_codegen.translation_info<pipeline = None> -> !transform.any_param
transform.annotate %memref_func "translation_info" = %none : !transform.any_op, !transform.any_param
transform.annotate %func_op_bufferized "translation_info" = %none : !transform.op<"func.func">, !transform.any_param
transform.yield
}
} // module

0 comments on commit ec9220a

Please sign in to comment.