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

[2/6] Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op #8795

Merged
merged 14 commits into from
Sep 8, 2021

Conversation

manupak
Copy link
Contributor

@manupak manupak commented Aug 19, 2021

This commit adds mainly the relay passes and ethosu_conv2d
operator to relay. The relay passes include the legalizations
and preprocessing of the relay graph in the paritioning.

Co-authored-by: Matthew Barrett matthew.barrett@arm.com

@manupak manupak changed the title Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op [2/6] Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op Aug 20, 2021
@jroesch jroesch self-assigned this Aug 20, 2021
@mbaret
Copy link
Contributor

mbaret commented Sep 3, 2021

We should be able to expose it, can you clearly comment where you the exact API so Mark and I can look into replacing in parallel?

@jroesch You can take a look here: https://github.com/apache/tvm/pull/8806/files#diff-ba18206383e6627c682094ad5b1a211be9dd8315e82b9c5f970496ce57ebe48c (from the next PR). That's the custom Relay -> TE lowering function we're making use of which demonstrates the API.

@manupak
Copy link
Contributor Author

manupak commented Sep 4, 2021

@jroesch @mbs-octoml PTAL when you have some time.

@mbs-octoml
Copy link
Contributor

LGTM thanks for the type annots, does it work if you enable checking in the mypy.ini? If so let's include that in this pr.

@manupak
Copy link
Contributor Author

manupak commented Sep 7, 2021

@mbs-octoml I enabled the check in task_mypy.sh; I dont think there is nothing to change in mypy.ini as the global setting is "ignore_errors = False"

manupak and others added 14 commits September 8, 2021 05:00
This commit adds mainly the relay passes and ethosu_conv2d
operator to relay. The relay passes include the legalizations
and preprocessing of the relay graph in the paritioning.

Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
* skipping the test if vela is not in the container.

Change-Id: I68cc4259dc33e1473e460956978f364fbf6596d8
* addressing Jared's comments

Change-Id: Ief669f788c6bd1a1be1004cbce5129ed06b63c3c
* addressing Elen's comments

Change-Id: Iad6315bb63f12ba318deb9c5c9eff7459ff58c48
* cleanup passes

Change-Id: I8e1cbedd2c4d3d0cdff481d775d9eb0577e44456
Change-Id: I7e65c2714d017c8a4b64986b111a6b51d128c963
Change-Id: I55cfbb3787c0aacdadf46c4859dff39287e65ddc
*addressing chris's comments
*addressing Nicola's comments

Change-Id: Id02788ddcdbc3679e0da37b2fa614cded0a4c1f5
*addressing missed 'hidden' comments of Chris
*addressing one missed comment of Nicola
*adding type annotations

Change-Id: Iadf4907b311e195731dbbed571e95a266341db8f
*further type fixes and one missed comment

Change-Id: I6da69fd95d17dfeaf5940da4f8d8c8ea142b39d2
*missed comment split_o

Change-Id: I4a4b19ff2cd18e8f568a63ae827f44358ed85b8e
* adding mypy check

Change-Id: Iaf58dbba2a9d8e1098a10c589d91b63c7efe646d
*removing premature insertion of get_accel_type utility

Change-Id: I210512e00a5eb46adf23d1d72eb16432db526d25
* rebase fixes

Change-Id: I06c9b536a7598646efce2b664fcc405aa6008203
@manupak
Copy link
Contributor Author

manupak commented Sep 8, 2021

@Mousius @ashutosh-arm , shall we prioritize to land this next as it is approved ? it is getting conflicts from CMSISNN PRs.

@ashutosh-arm
Copy link
Contributor

ashutosh-arm commented Sep 8, 2021

Yes, of course.

@jroesch jroesch merged commit 01aeeb1 into apache:main Sep 8, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

This commit adds mainly the relay passes and ethosu_conv2d
operator to relay. The relay passes include the legalizations
and preprocessing of the relay graph in the paritioning.

Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* skipping the test if vela is not in the container.

Change-Id: I68cc4259dc33e1473e460956978f364fbf6596d8

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* addressing Jared's comments

Change-Id: Ief669f788c6bd1a1be1004cbce5129ed06b63c3c

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* addressing Elen's comments

Change-Id: Iad6315bb63f12ba318deb9c5c9eff7459ff58c48

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* cleanup passes

Change-Id: I8e1cbedd2c4d3d0cdff481d775d9eb0577e44456

* Update TE comments

Change-Id: I7e65c2714d017c8a4b64986b111a6b51d128c963

* Address ekalda's comments in TE

Change-Id: I55cfbb3787c0aacdadf46c4859dff39287e65ddc

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*addressing chris's comments
*addressing Nicola's comments

Change-Id: Id02788ddcdbc3679e0da37b2fa614cded0a4c1f5

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*addressing missed 'hidden' comments of Chris
*addressing one missed comment of Nicola
*adding type annotations

Change-Id: Iadf4907b311e195731dbbed571e95a266341db8f

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*further type fixes and one missed comment

Change-Id: I6da69fd95d17dfeaf5940da4f8d8c8ea142b39d2

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*missed comment split_o

Change-Id: I4a4b19ff2cd18e8f568a63ae827f44358ed85b8e

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* adding mypy check

Change-Id: Iaf58dbba2a9d8e1098a10c589d91b63c7efe646d

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*removing premature insertion of get_accel_type utility

Change-Id: I210512e00a5eb46adf23d1d72eb16432db526d25

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* rebase fixes

Change-Id: I06c9b536a7598646efce2b664fcc405aa6008203

Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

This commit adds mainly the relay passes and ethosu_conv2d
operator to relay. The relay passes include the legalizations
and preprocessing of the relay graph in the paritioning.

Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* skipping the test if vela is not in the container.

Change-Id: I68cc4259dc33e1473e460956978f364fbf6596d8

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* addressing Jared's comments

Change-Id: Ief669f788c6bd1a1be1004cbce5129ed06b63c3c

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* addressing Elen's comments

Change-Id: Iad6315bb63f12ba318deb9c5c9eff7459ff58c48

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* cleanup passes

Change-Id: I8e1cbedd2c4d3d0cdff481d775d9eb0577e44456

* Update TE comments

Change-Id: I7e65c2714d017c8a4b64986b111a6b51d128c963

* Address ekalda's comments in TE

Change-Id: I55cfbb3787c0aacdadf46c4859dff39287e65ddc

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*addressing chris's comments
*addressing Nicola's comments

Change-Id: Id02788ddcdbc3679e0da37b2fa614cded0a4c1f5

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*addressing missed 'hidden' comments of Chris
*addressing one missed comment of Nicola
*adding type annotations

Change-Id: Iadf4907b311e195731dbbed571e95a266341db8f

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*further type fixes and one missed comment

Change-Id: I6da69fd95d17dfeaf5940da4f8d8c8ea142b39d2

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*missed comment split_o

Change-Id: I4a4b19ff2cd18e8f568a63ae827f44358ed85b8e

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* adding mypy check

Change-Id: Iaf58dbba2a9d8e1098a10c589d91b63c7efe646d

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

*removing premature insertion of get_accel_type utility

Change-Id: I210512e00a5eb46adf23d1d72eb16432db526d25

* Arm(R) Ethos(TM)-U NPU Relay passes and Conv2D op

* rebase fixes

Change-Id: I06c9b536a7598646efce2b664fcc405aa6008203

Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants