[Mlir-commits] [mlir] [tosa] : Enhance EqualizeRanks to handle dynamic dimensions. (PR #168564)

Sayan Saha llvmlistbot at llvm.org
Tue Nov 18 08:40:23 PST 2025


sahas3 wrote:

I've verified that with the fix the IR is legalized correctly to
```
func.func @main(%arg0: tensor<?x?x?x?xf32>) -> tensor<?x?x?x5xf32> {
    %0 = "tosa.const"() <{values = dense<0.000000e+00> : tensor<1x1x1x5xf32>}> : () -> tensor<1x1x1x5xf32>
    %1 = tosa.add %arg0, %0 : (tensor<?x?x?x?xf32>, tensor<1x1x1x5xf32>) -> tensor<?x?x?x5xf32>
    return %1 : tensor<?x?x?x5xf32>
  }
```

However, I am not sure what test I can add here to lock this down. If you have any suggestions on adding unit-tests please let me know. Thanks!

https://github.com/llvm/llvm-project/pull/168564


More information about the Mlir-commits mailing list