| Issue |
56033
|
| Summary |
`tensor.expand_shape` does not work for multiple dynamic dimensions
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Shukla-Gaurav
|
The `tensor.expand_shape` currently does not handle dynamic dimensions properly.
for example, the following IR generates error:
%1 = "tensor.expand_shape"(%0) {reassociation = [[0, 1], [2], [3]]} : (tensor<?x6x6xf32>) -> tensor<?x?x6x6xf32>
USE CASE:
This is specifically required for efficient lowering of `aten.matmul` operation in torch-MLIR. In order to lower it to `linalg.BatchMatmul`, following approach seems better:
1. broadcast(batch dimensions) the less rank matrix,
2. collapse the batch dimensions
3. matrix multiply by `linalg.BatchMatmul`
5. expand the batch dimensions
The last step fails in case of dynamic dimensions.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs