[Mlir-commits] [mlir] [mlir][tosa] Add pass to assign static input shape to TOSA functions (PR #171156)
Luke Hutton
llvmlistbot at llvm.org
Tue Dec 9 09:50:15 PST 2025
================
@@ -198,4 +198,26 @@ def TosaNarrowI64ToI32Pass : Pass<"tosa-narrow-i64-to-i32", "func::FuncOp"> {
];
}
+def TosaInputShape : Pass<"tosa-experimental-input-shape", "func::FuncOp"> {
+ let summary = "Override dynamic function arguments to specified static shapes.";
+ let description = [{
+ Pass that overrides the dynamic input shapes of function arguments to
+ specified static shapes. If a specified static shape conflicts with the
+ static dimensions in an original input shape, an error is reported.
+ }];
+
+ let constructor = "tosa::createTosaInputShapePass()";
+ let dependentDialects = [
+ "func::FuncDialect",
+ "tensor::TensorDialect",
+ "tosa::TosaDialect",
----------------
lhutton1 wrote:
Apologies, not sure I understood. From my understanding, `dependentDialects` is indicating which dialects needs to be loaded in the `MLIRContext` before this pass is run. Since the input IR is expected to have TOSA operations, it should be specified here?
https://github.com/llvm/llvm-project/pull/171156
More information about the Mlir-commits
mailing list