[BACKEND] Fix unsupported view op created during optimizations (#2510)

When propagating layout we were generating a view op with mismatching
total number of element per threads. Lowering such op would require
exchanging data across threads.
This change prevents the optimizer from generating such cases. This may
require further optimizations in the future.
This commit is contained in:
Thomas Raoux
2023-10-18 08:37:13 -07:00
committed by GitHub
parent 768fc1fcd9
commit e36d1665ca
5 changed files with 61 additions and 7 deletions

View File

@@ -107,6 +107,9 @@ bool isSharedEncoding(Value value);
bool isExpensiveCat(CatOp cat, Attribute targetEncoding);
// Return true if a view between the two types cannot be implemented as a no-op.
bool isExpensiveView(Type srcType, Type dstType);
} // namespace gpu
} // namespace triton
} // namespace mlir