Skip to content

Conversation

@lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented Feb 28, 2022

Builds upon the work in #10254 to remove identity operations sandwiched between two non compute operations (reshape/strided slice - concatenate is handled differently), under certain conditions. Specifically, an identity operation is not removed when the dimensionality between the two non-compute operations is reduced, due to non congruent values being accessed incorrectly. For example,

strided_slice(dims=4) -> identity -> reshape(dims=4)

becomes...

strided_slice -> reshape

but,

strided_slice(dims=4) -> identity -> reshape(dims=2)

remains as...

strided_slice -> identity -> reshape

Based upon work in #10254, so therefore contains the contents of that PR.

cc @ekalda @manupa-arm @mbaret @NicolaLancellotti @jacobbohlin @dchauhan-arm

Builds upon the work in apache#10254 to remove identity operations sandwiched
between two non-compute operations (reshape/strided slice - concatenate
is handled differently), under certain conditions. Specifically, an
identity operation is not removed when the dimensionality between the
two non-compute operations is reduced, due to non-congruent values
being accessed incorrectly. For example,

```
strided_slice(dims=4) -> identity -> reshape(dims=4)
```
becomes...
```
strided_slice -> reshape
```
but,
```
strided_slice(dims=4) -> identity -> reshape(dims=2)
```
remains as...
```
strided_slice -> identity -> reshape
```

Change-Id: Ie28ba384fcb3230d6f4651c0c19e2b9526ebcc42
@lhutton1 lhutton1 force-pushed the identity-optimizer-improvement branch from a2ce373 to 26ed6b9 Compare March 23, 2022 08:42
Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

LGTM!

@manupak manupak merged commit 2cb7695 into apache:main Mar 25, 2022
@manupak
Copy link
Contributor

manupak commented Mar 25, 2022

Thanks @lhutton1 !

@lhutton1 lhutton1 deleted the identity-optimizer-improvement branch March 30, 2022 08:41
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…pache#10411)

Builds upon the work in apache#10254 to remove identity operations sandwiched
between two non-compute operations (reshape/strided slice - concatenate
is handled differently), under certain conditions. Specifically, an
identity operation is not removed when the dimensionality between the
two non-compute operations is reduced, due to non-congruent values
being accessed incorrectly. For example,

```
strided_slice(dims=4) -> identity -> reshape(dims=4)
```
becomes...
```
strided_slice -> reshape
```
but,
```
strided_slice(dims=4) -> identity -> reshape(dims=2)
```
remains as...
```
strided_slice -> identity -> reshape
```

Change-Id: Ie28ba384fcb3230d6f4651c0c19e2b9526ebcc42
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.

2 participants