[linalg][fusion] Disallow fusion when it would create an invalid expand_shape
The input type of a linalg.generic can be less dynamic than its output type. If this is the case moving a reshape across the generic op would create invalid IR, as expand_shape cannot expand arbitrary dynamic dimensions. Check that the reshape is actually valid before creating the expand_shape. This exposes the existing verification logic in reshape utils and removes the incomplete custom implementation in fusion. Differential Revision: https://reviews.llvm.org/D116600
Loading
Please sign in to comment