[Mlir-commits] [mlir] [mlir][tosa] Make tosa-attach-target optional in addTosaToLinalgPasses (PR #193467)
Pablo Antonio Martinez
llvmlistbot at llvm.org
Fri Apr 24 06:09:25 PDT 2026
pabloantoniom wrote:
> Thanks for the PR! I'm wondering if an alternative approach is the remove the "tosa.target_env" attribute at the end of the TosaToLinalg pipeline? This way we avoid introducing additional options to the pipeline. The target environment is only useful while there are TOSA operators in the IR, after that it becomes redundant.
Removing the attribute does not look like a great idea to me, because after TosaToLinalg we could still have TOSA ops in principle (`runOnOperation` makes several TOSA ops as legal. So I'm not sure that the `tosa.target_env` would become redundant in all cases?
Also, having the pipeline remove the attribute does not seem as clean to me as just allowing the user to add it/not to add by using an option, because it would also remove a `tosa.target_env` that the user could have attached (for example by hand writing it in the input IR)
https://github.com/llvm/llvm-project/pull/193467
More information about the Mlir-commits
mailing list