You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unidirectional_lstm.mlir doesn't work with -iree-flow-dispatch-linalg-on-tensors #5151
One thing might help here, I hit an issue in this file when developing benchmarking tools. The main difference is that this file contains multiple blocks because it has a control-flow op (ie, mhlo.while op).
Try to canonicalize subtensor, tensor_reshape, etc.
Use the Flow::DispatchWorkgroupsOp canonicalization to pull in operations like init_tensor, constant etc.
This will require some more work cause oeprations that dont fall into this category need to be pulled in this way are lowered to flow.tensor. operations. Some of that needs to be plumbed through as well #5105 . Going to keep the ticket on this one and see if I can drop the method linked above.
I'll close with it. It might not actually work though. I was getting an error on buffer allocation with that change. It went away on rebase, but I see there is a swift shader failure on CI. Need to investigate.
Activity
hanhanW commentedon Mar 18, 2021
@MaheshRavishankar I'm not sure who is the best person for this bug, feel free to reassign to others.
hanhanW commentedon Mar 18, 2021
One thing might help here, I hit an issue in this file when developing benchmarking tools. The main difference is that this file contains multiple blocks because it has a control-flow op (ie, mhlo.while op).
MaheshRavishankar commentedon Mar 18, 2021
Ill take this one. It seems that this might help here https://reviews.llvm.org/D97887
hanhanW commentedon Mar 23, 2021
I've seen the same issue happens in other integration model tests, fyi.
MaheshRavishankar commentedon Mar 23, 2021
This patch to upstream fixes this particular issue https://reviews.llvm.org/D99226.
But it actually raises a slightly involved issue. The core issue is caused due to this method https://github.com/google/iree/blob/881de81238971869d6d62cabf8dc0b54a17be704/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp#L328.
It is trying to bring in operations that can be fused with the ops in the dispatch region. This is hard to get correct when you have a DAG of operations to pull in. Instead
subtensor,tensor_reshape, etc.Flow::DispatchWorkgroupsOpcanonicalization to pull in operations likeinit_tensor,constantetc.This will require some more work cause oeprations that dont fall into this category need to be pulled in this way are lowered to
flow.tensor.operations. Some of that needs to be plumbed through as well #5105 . Going to keep the ticket on this one and see if I can drop the method linked above.Fix operation ordering issue during inlining of operations into dispa…
Fix operation ordering issue during inlining of operations into dispa…
Fix operation ordering issue during inlining of operations into dispa…
Fix operation ordering issue during inlining of operations into dispa…
hanhanW commentedon Mar 31, 2021
Can we close the issue in a change/PR that enables the test: https://github.com/google/iree/blob/main/iree/test/e2e/models/unidirectional_lstm.mlir
Or you think it is too fragile at this moment, people would be struggle on it?
hanhanW commentedon Mar 31, 2021
Oh, I saw it in #5259
MaheshRavishankar commentedon Mar 31, 2021
I'll close with it. It might not actually work though. I was getting an error on buffer allocation with that change. It went away on rebase, but I see there is a swift shader failure on CI. Need to investigate.
Add tests to run few other (smaller) models with Linalg on tensors path.
Add tests to run few other (smaller) models with Linalg on tensors path.
Add tests to run few other (smaller) models with Linalg on tensors pa…