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

[BYOC][ETHOSN] Add support for quantized convolution #6335

Merged
merged 4 commits into from
Aug 27, 2020

Conversation

mbaret
Copy link
Contributor

@mbaret mbaret commented Aug 25, 2020

This PR adds support for quantized convolution for the Ethos-N backend. This includes mapping it via a composite function and all the necessary methods to convert from Relay to the APIs in Support Library.

Co-authored-by: Leo Blonk [email protected]
Co-authored-by: Tristan O'Connor [email protected]

mbaret and others added 3 commits August 25, 2020 15:45
This PR adds support for quantized convolution. This
includes mapping it via a composite function and all
the necessary methods to convert from Relay to the
APIs in Support Library.


Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>
Change-Id: I0794b0ac6190478e2d1b858ad0dd90f37fc0207b
Change-Id: Iab865619b449a3d0dd6bb0dbdcb198acd529fc4e
@mbaret
Copy link
Contributor Author

mbaret commented Aug 26, 2020

cc @masahi @comaniac @zhiics @Leo-arm

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

Just some miner comments.

@@ -50,6 +50,16 @@ bool IsEthosnOp(const Call& call, const std::string& op_name) {
}
}

bool IsEthosnFunc(const Call& call, const std::string& op_name) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to me that this function is not just for checking if a call is for an Ethos-N composite function. Maybe we should move it to a common place, so does IsEthosnOp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a suggestion of a good common location? We could maybe handle this in a follow-up.

Copy link
Contributor

Choose a reason for hiding this comment

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

No idea... Let's leave them here for now.

tests/python/contrib/test_ethosn/infrastructure.py Outdated Show resolved Hide resolved
Change-Id: I51f90499f7ce82a1ce49f0731d3d50627e1d0225
@masahi masahi merged commit 30cd230 into apache:master Aug 27, 2020
@masahi
Copy link
Member

masahi commented Aug 27, 2020

Thanks @mbaret @comaniac

kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 17, 2020
* [BYOC][ETHOSN] Add support for quantized convolution

This PR adds support for quantized convolution. This
includes mapping it via a composite function and all
the necessary methods to convert from Relay to the
APIs in Support Library.


Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>

* Fix padding change

Change-Id: I0794b0ac6190478e2d1b858ad0dd90f37fc0207b

* Add docs to Tvm2Npu methods

Change-Id: Iab865619b449a3d0dd6bb0dbdcb198acd529fc4e

* Remove generate tests

Change-Id: I51f90499f7ce82a1ce49f0731d3d50627e1d0225

Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>
kevinthesun pushed a commit to kevinthesun/tvm that referenced this pull request Sep 18, 2020
* [BYOC][ETHOSN] Add support for quantized convolution

This PR adds support for quantized convolution. This
includes mapping it via a composite function and all
the necessary methods to convert from Relay to the
APIs in Support Library.


Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>

* Fix padding change

Change-Id: I0794b0ac6190478e2d1b858ad0dd90f37fc0207b

* Add docs to Tvm2Npu methods

Change-Id: Iab865619b449a3d0dd6bb0dbdcb198acd529fc4e

* Remove generate tests

Change-Id: I51f90499f7ce82a1ce49f0731d3d50627e1d0225

Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Sep 18, 2020
* [BYOC][ETHOSN] Add support for quantized convolution

This PR adds support for quantized convolution. This
includes mapping it via a composite function and all
the necessary methods to convert from Relay to the
APIs in Support Library.


Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>

* Fix padding change

Change-Id: I0794b0ac6190478e2d1b858ad0dd90f37fc0207b

* Add docs to Tvm2Npu methods

Change-Id: Iab865619b449a3d0dd6bb0dbdcb198acd529fc4e

* Remove generate tests

Change-Id: I51f90499f7ce82a1ce49f0731d3d50627e1d0225

Co-authored-by: Leo Blonk <[email protected]>
Co-authored-by: Tristan O'Connor <[email protected]>
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