Results 225 comments of Sean Silva

@Yancey1989 it looks like https://github.com/llvm/torch-mlir/issues/1227 landed -- could you try to add these tests now?

The output shape looks like [12, 7, 64] in your snippet and not [-1, -1, 64]. Can you show the actual IR snippet you are dealing with?

(for future reference, it's usually important to show a reduced, fully valid IR example with any bug reports like this)

It looks we have already done all the shape math statically, because the result shape is inferred as `!torch.vtensor`. So I don't want to do any special local logic here...

> So should I just rewrite aten.view to use the statically-inferred output shape when the current logic fails? That would make sense to me. Actually, I would add a canonicalization...

TorchOps.cpp -- you need to add `let hasCanonicalizer = 1` the ODS definition.

See here for more info: https://mlir.llvm.org/docs/Canonicalization/

Remove the TorchToLinalg code as well please since it is not not useful.

We definitely don't want to regress our testing of dynamic shapes for all backends due a limitation in the TOSA backend, so I would avoid changing the test. We can...