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

[ETHOSN] Support conversion of add/mul to requantize where possible #12887

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

lhutton1
Copy link
Contributor

Add/mul operations that correspond to identity operations can be converted to a simple reinterpret quantize operation. This conversion takes place in the convert equivalents pass similar to the depthwise counter-part.

In addtion, an issue was noticed that would cause unsupported operations to raise an error rather than not being offloaded. This has been fixed by allowing the conversion to return Null when the conversion is not supported.

cc @ashutosh-arm @leandron

@github-actions github-actions bot requested a review from leandron September 23, 2022 14:30
Copy link
Contributor

@ashutosh-arm ashutosh-arm left a comment

Choose a reason for hiding this comment

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

Thanks Luke for the great effort. It looks like an excellent change. I've left a few minorquestions/comments.

@lhutton1
Copy link
Contributor Author

lhutton1 commented Sep 28, 2022

Will wait on #12770 before pushing an update to pass CI

Add/mul operations that correspond to identity operations can be
converted to a simple reinterpret quantize operation. This conversion
takes place in the convert equivalents pass similar to the depthwise
counter-part.

In addtion, an issue was noticed that would cause unsupported
operations to raise an error rather than not being offloaded. This has
been fixed by allowing the conversion to return Null when the conversion
is not supported.

Change-Id: I7747d499820fa3a9cf0ca72a6d3ff1060b000e9c
Change-Id: Ia3377b275639e71273fbfe5cfdb2fb5214335987
Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @lhutton1!

Copy link
Contributor

@ashutosh-arm ashutosh-arm left a comment

Choose a reason for hiding this comment

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

I had another look. LGTM! Thanks Luke 😸

@leandron leandron merged commit 5f132fd into apache:main Sep 29, 2022
@lhutton1 lhutton1 deleted the add-mul-requantize branch September 29, 2022 08:42
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…pache#12887)

* [ETHOSN] Support conversion of add/mul to requantize where possible

Add/mul operations that correspond to identity operations can be
converted to a simple reinterpret quantize operation. This conversion
takes place in the convert equivalents pass similar to the depthwise
counter-part.

In addtion, an issue was noticed that would cause unsupported
operations to raise an error rather than not being offloaded. This has
been fixed by allowing the conversion to return Null when the conversion
is not supported.
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