Skip to content

[CORE] Make external_mods first class field in the IRModule#9692

Closed
mikepapadim wants to merge 21 commits intoapache:mainfrom
mikepapadim:make_external_mods_irmodule_field
Closed

[CORE] Make external_mods first class field in the IRModule#9692
mikepapadim wants to merge 21 commits intoapache:mainfrom
mikepapadim:make_external_mods_irmodule_field

Conversation

@mikepapadim
Copy link
Contributor

@mikepapadim mikepapadim commented Dec 9, 2021

Currently, external_mods used in te_compiler are stored in the attrs. Apart of the te_compiler external mods are being used on various AOT helpers to extract the funcs of each mod. Therefore, in this PR we make external_mods a first-class first of the IRModule and we add helpers to check if external mods are defined and to extract funcs by name similarly to the PackedFucs GetFunction.

@mbs-octoml @electriclilies

mikepapadim and others added 20 commits December 9, 2021 21:20
Co-authored-by: Lily Orth-Smith <lilyorthsmith@gmail.com>
* fix things

* linting

* remove format string messing things up

* Update python/tvm/auto_scheduler/relay_integration.py

Co-authored-by: Cody Yu <comaniac0422@gmail.com>

* move to tvm error

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
* add for loop syntax sugar

* remove prints

* better doc

* finish thread binding

* fix CI

* fix CI

* address comments

* update sstub

* fix CI

* remove failed test

* update stub

* address comments

* add decorator
* Based on discussion in
 https://discuss.tvm.apache.org/t/rfc-ci-add-a-skip-ci-tag-to-shortcut-builds-and-tests/11589/10
 * We will probably continue to leverage this bot for other, similar
 PR review feedback.
apache#9638)

* Options to create test directory and print commands

Change-Id: I381b4dfe870c9f6462681e77ebf0d3187749a535

* Lint fixes

Change-Id: I043d4e403df242ed304e10e98828fb1c982aac43

* Addressed review comments: fixed incorrect docstring

Change-Id: Ic0c7528986d87cb04ef5ccb03bf98ccf87750675
Add support for SIGMOID activation function using the lookup
table mechanism in the NPU.
* Add Hexagon RPC

* removed android remote and updated Readme

* Add check for workspace size

* Make libtvm_runtime consistent for Android

* Remove root access

* Fix some docstrings

* Make stack remote size as parameter

* add documentation

* Refactor test conftest

* clang format

* Decoupled USE_HEXAGON_RPC

* fix creation of test base directory on android

* Address global variable

* Fix format and Cleanup cmake

* Fix build for other targets
…tware (apache#9672)

* Upgrade to latest version of FVP based on Arm(R) Corstone(TM)-300 software

Change-Id: I22685c117f3b6e9bc53c25ede14bb91c2b9f85f3

* Upgrade to latest version of FVP based on Arm(R) Corstone(TM)-300 software

- Allow CI tests to pass with existing FVP

Change-Id: I67117de96c525fa01dae1d402a5f08743681a246
* [Frontend][ONNX] Support ONNX Scan operator

* fix lint

* remove test_scan_sum in unsupported_onnx_tests

* support scan opset 8

* fix lint

* fix negative axes bug

* fix lint

Co-authored-by: Matthew Brookhart <mbrookhart@octoml.ai>
…e#9508)

* Current conv2d tests compare the conv2d operator against tvm's execution of the default schedule of conv2d as defined in TOPI and that is not bitexact with tflite runtime's implemention. Therefore a tolerance of "1" in quantized 8-bit domain is used.

* Converts the current conv2d tests to use TensorFlow APIs to create a test cases for conv2D and compare against TFLite runtime.
…5 NPU (apache#9307)

* Tutorial for running TVM on Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU

Change-Id: If1e1134b56639021036862e8ea65a8e9d33dceb7

* Tutorial for running TVM on Arm(R) Cortex(R)-M55 CPU and Ethos(TM)-U55 NPU

- Moved tutorials/micro/cortex_m_ethosu.py to gallery/how_to/work_with_microtvm/micro_ethosu.py

Change-Id: Ib554df6649b7313d4414187d5334ec5b03f35f33

* [micronpu] Update and cleanup tutorials.

- Moved tutorials/micro/cortex_m_ethosu.py to gallery/how_to/work_with_microtvm/micro_ethosu.py
- Replaced full linker script document with a link to the linker script on github

Change-Id: Ic77648a4fc3dd76161d689774d21a3347a577b90

* [micronpu] Update and cleanup tutorial

- Replace Makefile code with a link to Makefile on github
- Replace header files with a link to header files on github
- Update demo.c with changes introduced by Device API
- Update tvmc command line arguments

Change-Id: If6a254b368550c0f3effb8d1cb15f062279964e2
* [TIR][USMP] adding the pass to convert to pool offsets

This commit adds a transform pass that consumes
the planned pool allocations using memory planning algorithm
that convertes them to pool offsets.

* adds two test cases for a linear structure with two pools
* adds test case with a single pool for residual structures

Change-Id: I9d31e854461b5c21df72d1452120d286b96791c0

* [TIR][USMP] adding the pass to convert to pool offsets

* Adding a toggle to produce TIR that is TVMScript printable for unit
testing
* Fixing the unit tests
* Ensure deterministic pool variable ordering.

Change-Id: I317675df03327b0ebbf4ca074255384e63f07cd6

* [TIR][USMP] adding the pass to convert to pool offsets

Fixing the references after changes in the memory planning
algorithm.

Change-Id: Id7c22356fd5de43d10a2b4fc70e978af2c6d599d

* [TIR][USMP] adding the pass to convert to pool offsets

* fixing the lint

Change-Id: I7ff920b92d14a9919c930a4b35a2169c77a57dd1

* [TIR][USMP] adding the pass to convert to pool offsets

* removing unnecessary defitinitions
* remove global var map
* adding explaination for let bindings to pointer type

Change-Id: I31bd1a9f3057ee7f06252263565b0f75c51e6d13

* [TIR][USMP] adding the pass to convert to pool offsets

* rebase changes
* making imports absolute
* fixing typos and removing unnecesary lines

Change-Id: I4c94b9955b001513fecb39ca94f81b1ad99c7bfc

* [TIR][USMP] adding the pass to convert to pool offsets

* fixing typos

Change-Id: I42c557fd394aefdf8c2e825c4e88770eb0732f9b
Although an action (build, test, or release) is always required by
base-tool-box.py currently actions are not set as "required" in the
parser, hence it doesn't complain when an action is missing and later
when 'args.platform' attribute (present in all actions) is referenced
the tool exits abruptly due to an AttributeError (because 'platform' is
not set), without giving any clue on what went wrong. For instance:

$ python3 ./base-box-tool.py --provider virtualbox # no action is given

This commit fixes it by setting action subparsers as required so the
parser complains when no action is specified.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
@mikepapadim mikepapadim force-pushed the make_external_mods_irmodule_field branch from 47f4883 to 6910216 Compare December 9, 2021 19:21
@mikepapadim mikepapadim closed this Dec 9, 2021
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.