Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flow] Add patterns to convert from tensor.concat to flow.tensor.update. #19126

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

MaheshRavishankar
Copy link
Contributor

These are in preparation to delay to decomposition of tensor.concat into tensor.insert_slices. This patch just adds the patterns to lower a tensor.concat along the outer dimension to flow.tensor.update. Future changes will delay the decomposition of tensor.concat to allow for non-outer dimension concatenation to be conveted into tensor.insert_slices before dispatch formation with the tensor.insert_slice fused into its producers.

Towards #19092

@benvanik
Copy link
Collaborator

Nice! These should be things that end up getting turned into in-place allocations for the inputs - if they don't today I'd say it's still a good change as it's just exposing the failures later on and they definitely wouldn't be turned to in-place allocations if they were left as dispatches. It'll help me prioritize finally doing better there if we have more pressure on it :)

@MaheshRavishankar
Copy link
Contributor Author

Nice! These should be things that end up getting turned into in-place allocations for the inputs - if they don't today I'd say it's still a good change as it's just exposing the failures later on and they definitely wouldn't be turned to in-place allocations if they were left as dispatches. It'll help me prioritize finally doing better there if we have more pressure on it :)

Will have to check that. There is a chain of things here I will need to work through... sending this out in the meantime.

…pdate`.

These are in preparation to delay to decomposition of `tensor.concat`
into `tensor.insert_slice`s. This patch just adds the patterns to
lower a `tensor.concat` along the outer dimension to
`flow.tensor.update`. Future changes will delay the decomposition of
`tensor.concat` to allow for non-outer dimension concatenation to be
conveted into `tensor.insert_slice`s before dispatch formation with
the `tensor.insert_slice` fused into its producers.

Towards iree-org#19092

Signed-off-by: MaheshRavishankar <[email protected]>
Signed-off-by: MaheshRavishankar <[email protected]>
Signed-off-by: MaheshRavishankar <[email protected]>
@MaheshRavishankar MaheshRavishankar enabled auto-merge (squash) November 14, 2024 02:39
@MaheshRavishankar MaheshRavishankar merged commit dd9d616 into iree-org:main Nov 14, 2024
36 checks passed
@MaheshRavishankar MaheshRavishankar deleted the concat_to_flow branch November 14, 2024 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants