Skip to content

Add patterns to fold tensor.empty with tensor.collapse_expand/shape. - #11771

Merged
MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:fix_11770
Jan 10, 2023
Merged

MaheshRavishankar merged 2 commits into
iree-org:mainfrom
MaheshRavishankar:fix_11770

Conversation

@MaheshRavishankar

@MaheshRavishankar MaheshRavishankar commented Jan 10, 2023 •

Copy link
Copy Markdown
Collaborator

Without these patterns, we end up with sequences like

%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...

which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the
patterns the tensor.collapse_shape fold away, avoiding
tensor.empty() being left outside.

Fixes #11770

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator Author

Aargh... this actially not what we want. Ill update the PR in a bit.

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator Author

This fixes the issue. Updated description

@MaheshRavishankar
MaheshRavishankar marked this pull request as ready for review January 10, 2023 06:05

@grypp grypp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, good catch

Without these patterns, we end up with sequences like

```
%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
```

which dont get pulled into dispatch regions since
`tensor.collapse_shapes` arent pulled into dispatch regions. With the
patterns the `tensor.collapse_shape` fold away, avoiding
`tensor.empty()` being left outside.

Fixes iree-org#11770
@MaheshRavishankar
MaheshRavishankar enabled auto-merge (squash) January 10, 2023 20:15
@MaheshRavishankar
MaheshRavishankar merged commit 1603491 into iree-org:main Jan 10, 2023
pzread pushed a commit to pzread/iree that referenced this pull request Jan 11, 2023
@pzread

pzread commented Jan 12, 2023 •

Copy link
Copy Markdown
Contributor

It looks like the MobileSSD x86_64 benchmarks started failing from this PR.
https://buildkite.com/iree/iree-benchmark-linux/builds/2599

... died with <Signals.SIGSEGV: 11>.

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator Author

I'll take a look in the morning

@pzread

pzread commented Jan 13, 2023

Copy link
Copy Markdown
Contributor

Hi @MaheshRavishankar is there any update about the SIGSEGV on MobileSSD? The benchmark CI is failing due to this issue. If it's not an easy fix, we should either revert this PR or temporarily disable the MobileSSD benchmark

@MaheshRavishankar

Copy link
Copy Markdown
Collaborator Author

Sorry, I wasn't able to look into this. Let's revert it for now, if revert doesn't cause issues

pzread added a commit that referenced this pull request Jan 13, 2023
pzread pushed a commit that referenced this pull request Jan 13, 2023
…and/shape`." (#11829)

Reverts #11771 due to SIGSEGV on MobileSSD
MaheshRavishankar pushed a commit to MaheshRavishankar/iree that referenced this pull request Jan 16, 2023
This relands iree-org#11771.

Without these patterns, we end up with sequences like

```
%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
```

which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the
patterns the tensor.collapse_shape fold away, avoiding
tensor.empty() being left outside.

Fixes iree-org#11770
rsuderman pushed a commit to rsuderman/iree that referenced this pull request Jan 19, 2023
This relands iree-org#11771.

Without these patterns, we end up with sequences like

```
%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
```

which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the
patterns the tensor.collapse_shape fold away, avoiding
tensor.empty() being left outside.

Fixes iree-org#11770
MaheshRavishankar pushed a commit to MaheshRavishankar/iree that referenced this pull request Jan 25, 2023
This relands iree-org#11771.

Without these patterns, we end up with sequences like

```
%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
```

which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the
patterns the tensor.collapse_shape fold away, avoiding
tensor.empty() being left outside.

Fixes iree-org#11770
MaheshRavishankar added a commit that referenced this pull request Jan 25, 2023
…11847)

This relands #11771.

Without these patterns, we end up with sequences like

%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the patterns the tensor.collapse_shape fold away, avoiding tensor.empty() being left outside.

Fixes #11770
@MaheshRavishankar
MaheshRavishankar deleted the fix_11770 branch February 2, 2023 06:29
qedawkins pushed a commit to qedawkins/iree that referenced this pull request Apr 2, 2023
…ree-org#11847)

This relands iree-org#11771.

Without these patterns, we end up with sequences like

%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the patterns the tensor.collapse_shape fold away, avoiding tensor.empty() being left outside.

Fixes iree-org#11770
jpienaar pushed a commit that referenced this pull request May 1, 2023
…e`. (#11771)

Without these patterns, we end up with sequences like

```
%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
```

which dont get pulled into dispatch regions since
`tensor.collapse_shapes` arent pulled into dispatch regions. With the
patterns the `tensor.collapse_shape` fold away, avoiding
`tensor.empty()` being left outside.

Fixes #11770

Fixes #11770
jpienaar pushed a commit that referenced this pull request May 1, 2023
…and/shape`." (#11829)

Reverts #11771 due to SIGSEGV on MobileSSD
jpienaar pushed a commit that referenced this pull request May 1, 2023
…11847)

This relands #11771.

Without these patterns, we end up with sequences like

%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the patterns the tensor.collapse_shape fold away, avoiding tensor.empty() being left outside.

Fixes #11770
rengolin pushed a commit to plaidml/iree that referenced this pull request May 2, 2023
…ree-org#11847)

This relands iree-org#11771.

Without these patterns, we end up with sequences like

%0 = tensor.empty ...
%1 = tensor.collapse_shape %0 ...
which dont get pulled into dispatch regions since
tensor.collapse_shapes arent pulled into dispatch regions. With the patterns the tensor.collapse_shape fold away, avoiding tensor.empty() being left outside.

Fixes iree-org#11770
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.

Empty output tensors not getting pulled in to dispatch regions.

5 participants