For such op chains, we can create new linalg.init_tensor ops
with the result type of the linalg.tensor_reshape op.
Depends On D99115
|  Differential  D99116  
[mlir][linalg] Fold init_tensor -> fill -> tensor_reshape chain Authored by antiagainst on Mar 22 2021, 2:48 PM. 
Details For such op chains, we can create new linalg.init_tensor ops Depends On D99115 
Diff Detail 
 Event Timeline
 
 
 Comment Actions Address comments 
 Comment Actions What is the benefit you see in duplicating the init_tensor? I think I would have just swapped the reshape and the fill and punt decision about inplace vs alloc to later as I don't have enough data. Maybe you already have a use case in mind? | ||||||||||||||||||||||||
Nit: Fix stale comment