[Mlir-commits] [mlir] [mlir][test] Test conversion of TOSA to EmitC via LinAlg (PR #94640)
Paul Kirth
llvmlistbot at llvm.org
Thu Oct 3 09:23:34 PDT 2024
ilovepi wrote:
@simon-camp I finally made some progress here after getting some help from @mtrofin on the saved model. For now I've gone w/ a super simple model from TF Lite and we can use more complex ones once we fix the issues w/ the test/conversion pipeline.
Right now the main blocker I have is that the final `--convert-memref-to-emitc` is failing to when trying to convert the function argument. Looking at the failure and some of the tests around memref conversion, this seems intentional, as I found tests that are specifically checking that this conversion fails. I would have supposed that this could be transformed into an emitc array type or pointer, but it seems not to be supported.
I think this is happening because we don't have a materialization callback available in `TypeConverter::convertSignatureArgs()`, but it is not clear to me if we should add something there, add some other transform in the placeholder python script, or take a completely different approach.
Error:
```
<stdin>:26:5: error: failed to legalize unresolved materialization from ('memref<1xf32>') to '!emitc.array<1xf32>' that remained live after conversion
memref.store %20, %arg2[%2] : memref<1xf32>
^
<stdin>:26:5: note: see current operation: %0 = "builtin.unrealized_conversion_cast"(%arg2) : (memref<1xf32>) -> !emitc.array<1xf32>
<stdin>:26:5: note: see existing live user here: %29 = emitc.subscript %0[%5] : (!emitc.array<1xf32>, index) -> !emitc.lvalue<f32>
```
https://github.com/llvm/llvm-project/pull/94640
More information about the Mlir-commits
mailing list