forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate temporary buffer in binary op conversion (#130)
Improves MLIR pipeline to avoid temporary buffer allocation and copy in linalg named binary operation conversion. Changes: - use tensor.empty in outs - add bufferization pre- and post-processing - mark outputs as 'restrict'
- Loading branch information
Showing
1 changed file
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
But we still need to ensure that the output tensor is properly sized even if the op itself implies strict shapes alignment for inputs and outputs. As we see below it involves some additional stuff with dynamics dimensions but semantically iteration space has already been completely defined by shape of the input that doesn't require special decoding of dynamic dimensions (and would be a part of normal tensor lowering with dynamic dimensions). I would like to see more expressiveness from the named ops at least to avoid writing this dynamic-dimensions code below.