[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Add missing "else if" branch (PR #101148)

Matthias Springer llvmlistbot at llvm.org
Wed Jul 31 05:25:04 PDT 2024


matthias-springer wrote:

> The second listing is with your https://github.com/llvm/llvm-project/pull/101318 patched in, but this also matches the behavior from before this PR.

Sorry, I'm still confused.

So the expected behavior is [this](https://github.com/llvm/llvm-project/pull/101148#issuecomment-2260248541): `tf.While` has result types `(tensor<i32>, tensor<2x3xf32>)`.

With #101148, the result type is `(tensor<i32>, tensor<!tf_type.variant<tensor<*xf32>>>)`.

With #101318 (on top of #101148), the result type is also `(tensor<i32>, tensor<!tf_type.variant<tensor<*xf32>>>)`, but the test is passing now. (But it shouldn't pass.)

Is that accurate?

With `-debug` (which is a flag of `mlir-opt`), we would see output such as this:
```
//===-------------------------------------------===//
Legalizing operation : 'test.signature_conversion_no_converter'(0x62ba6364c0c0) {
  * Fold {
  } -> FAILURE : unable to fold

  * Pattern : 'test.signature_conversion_no_converter -> ()' {
Trying to match "(anonymous namespace)::TestTestSignatureConversionNoConverter"
```
So we can see what patterns are being applied. I was hoping that there is a similar flag for `tf-opt`. Without this output, we have no clue what's going on.


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


More information about the Mlir-commits mailing list