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

[4/6] Arm(R) Ethos(TM)-U NPU TIR to CS for Conv2D #8811

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

manupak
Copy link
Contributor

@manupak manupak commented Aug 23, 2021

This commit introduces the TIR to Command Stream(CS) translation using Vela API calls for conv2D and copy operations. It will create Vela npu_op objects for each command.

This is blocked on merging #8795 and #8806 . Therefore this PR shows the accumulation of the content of all three PRs (including this one).

@manupak manupak marked this pull request as ready for review September 15, 2021 11:19
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

@manupa-arm did a pass through this one, can address comments in a follow on to whichever of the following ones we merge

python/tvm/relay/backend/contrib/ethosu/tir/spec.py Outdated Show resolved Hide resolved
python/tvm/relay/backend/contrib/ethosu/tir/utils.py Outdated Show resolved Hide resolved
src/relay/backend/contrib/ethosu/compiler_attrs.cc Outdated Show resolved Hide resolved
tests/python/contrib/test_ethosu/test_compiler.py Outdated Show resolved Hide resolved
@manupak manupak force-pushed the ethosu_upstreaming_p4 branch 2 times, most recently from de13b68 to 5837179 Compare September 22, 2021 16:19
@manupak
Copy link
Contributor Author

manupak commented Sep 23, 2021

This is failing CI on an unrelated error (I think due to : #9013). I think #9076 should fix it (Thanks @mbs-octoml ).

Looking for reviews/approval.

This commit introduces the TIR to Command Stream(CS)
translation using Vela API calls for conv2D and copy operations.
It will create Vela npu_op objects for each command.

Change-Id: I906d2cb333652813142cc70fb39b8372ec498bd0
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

thanks @manupa-arm just a few things for follow-up PR

@@ -39,6 +41,14 @@ class BufferType(Enum):
output = auto()


_REGION_MAP = {
Copy link
Contributor

Choose a reason for hiding this comment

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

for a follow-on: should this become enum.IntEnum?



if __name__ == "__main__":
test_buffer_info_extraction()
Copy link
Contributor

Choose a reason for hiding this comment

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

for a follow-on: sys.exit(pytest.main([__file__] + sys.argv[1:]))

@jroesch jroesch merged commit 2c6fb65 into apache:main Sep 27, 2021
AndrewZhaoLuo added a commit to AndrewZhaoLuo/tvm that referenced this pull request Sep 28, 2021
* main: (37 commits)
  [ONNX] [Relay] Dynamic squeeze (apache#9095)
  [Meta Schedule][M3b] Database (apache#9061)
  [Bugfix] Add nullptr checking for `AttrStmt` with `coproc_uop_scope` attr key (apache#9123)
  [Codegen] Swap out analyzer when outlining (apache#9117)
  [CI] bash.sh, build.sh: add option to set the container name and hostname (apache#9110)
  Ensure google-mock is installed and setup (apache#9107)
  Arm(R) Ethos(TM)-U NPU TIR to CS for Conv2D (apache#8811)
  Frontend: add onnx GlobalLpPool op (apache#8845)
  [LLVM] Refactor MakeCallPacked, NFC (apache#9118)
  prevent casting handle to other types (apache#9114)
  fix annotation of tir generic (apache#9119)
  [Relay] Register layout conversion function to more reduce ops (apache#9048)
  Fix the missing `dtype` attribute of `tir.Shuffle` in Python level (apache#9131)
  add `multiply` and remove `subtract` for dnnl json runtime (apache#9120)
  relu of dnnl json runtime only support 4-dims input (apache#9122)
  [Meta Schedule][M3a] SpaceGenerator  (apache#9079)
  [TensorIR][Bugfix] Disallow fusing loops with dependency (apache#9112)
  adding Jorn to reviewers list (apache#9105)
  [BYOC] Fix incorrect conv2d padding handling of `dnnl with c source runtime` (apache#9097)
  [Frontend][TFLite] fix apache#9078 (apache#9099)
  ...
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
This commit introduces the TIR to Command Stream(CS)
translation using Vela API calls for conv2D and copy operations.
It will create Vela npu_op objects for each command.

Change-Id: I906d2cb333652813142cc70fb39b8372ec498bd0
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
This commit introduces the TIR to Command Stream(CS)
translation using Vela API calls for conv2D and copy operations.
It will create Vela npu_op objects for each command.

Change-Id: I906d2cb333652813142cc70fb39b8372ec498bd0
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