* [ONNX] QLinearAveragePool and QLinearGlobalAveragePool contrib op
* Fix linter error for variable name and else after return
* Separate quantized avg_pool impl and add TODO for global_avg_pool
* Fix comment typo
* When using a packaged TVM such as tlcpack, it is impossible to run
`tvm.micro.get_standalone_crt_dir()`, because the subtree
`standalone_crt/` is not available.
* This patch adds `standalone_crt/` as `data_files`, so that they
can be picked up by _ffi.libinfo.find_lib_path() and therefore
be found when `tvm.micro.get_standalone_crt_dir()` is invoked.
* Arm(R) Ethos(TM)-U NPU TIR compiler with conv2d support
This commit adds the lowering passes necessary to lower
an NPU Relay module down to a TIR module that can be
compiled for the NPU. Conv2d is supported as the first
NPU operator. An intermediate TE stage between Relay and
TIR allows support for scheduling the operators.
Co-authored-by: Manupa Karunaratne <Manupa.Karunaratne@arm.com>
* Fix Conv2D TIR type sensitivity
Change-Id: I3741f9dd8bb5952590ff8c586f6b96e5c3a03795
* Arm(R) Ethos(TM)-U NPU TIR passes and TE for Conv2D
*fixing tests
Change-Id: Id4a4c80f72ce29b98fc8b3954a1413c1c7fda500
* Fix import guards for tests
Change-Id: Iaee06017bd125d3040ce42182c4ccdb80d7fc946
* Fix typing failures with ignores
Change-Id: I81513f112a42b93cfdd3bcaf8e8852dd60ffe9e9
* Remove unused import
Change-Id: I6596b62ab56e4ca8b31ef08293686f53f38454d2
* Reintroduce get_target_accel_type
Change-Id: I0aaf83fe0204c0db435692e9b92dee6e9d6997fe
Co-authored-by: Manupa Karunaratne <Manupa.Karunaratne@arm.com>
* Initial commit of API server impl.
* initial commit of api client
* Add TVM-side glue code to use Project API
* Change tvm.micro.Session to use Project API
* Rework how crt_config.h is used on the host.
* use template crt_config.h for host test runtime; delete
src/runtime/crt/host/crt_config.h so that it doesn't diverge from
the template
* bring template crt_config.h inline with the one actually in use
* rename to MAX_STRLEN_DLTYPE
* Create a dedicated TVM-side host crt_config.h in src/runtime/micro
* Modify Transport infrastructure to work with Project API
* Add host microTVM API server
* Zephyr implementation of microTVM API server
* move all zephyr projects to apps/microtvm/zephyr/template_project
* consolidate CcompilerAnnotator
* Allow model library format with c backend, add test.
* Update unit tests
* fix incorrect doc
* Delete old Zephyr build infrastructure
* Delete old build abstractions
* Delete old Transport implementations and simplify module
* lint
* ASF header
* address gromero comments
* final fixes?
* fix is_shutdown
* fix user-facing API
* fix TempDirectory / operator
* Update micro_tflite tutorial
* lint
* fix test_crt and test_link_params
* undo global micro import, hopefully fix fixture
* lint
* fix more tests
* Add session_constructor_args to tracker request() function.
* Allows tracker clients to open non-traditional RPC sessions
* Generate entry_func symbol in C host codegen.
* Needed for AutoTVM.
* print MeasureErrorNo enum value in MeasureResult repr
* Add microTVM session constructor.
* This constructor is to be called from the RPC driver to flash and
connect to the RPC server on the microcontroller.
* add build_kwargs as a Builder constructor arg.
* build_kwargs is derived from pre-configured args, the runner, and
now from the script.
* user-supplied build kwargs override the other two, and a warning is
printed if any key is overridden.
* Add do_fork option to Builder, to support stateful builders
* When AutoTVM builder forks, any global state modified by the
build_func is lost between builds
* Checkin module_loader used to build and flash microTVM for autotuning.
* Import micro into top-level when enabled.
* AutoTVM RPC server needs to load the micro session constructor.
* Add tvm.contrib.random.random_fill to microTVM.
* Allows autotuning with random data.
* Move compilation to runner :O
* Add a tutorial for AutoTVM with microcontrollers.
* Fix si_prefix in autotuner callback
* black format and git-clang-format
* Switch tutorial back to qemu version
* improve error reporting so CI will show test error
* black format
* autotvm is working
* fix tutorial
* fix dependencies
* fix auto tune issue
* lint
* address comments
* fix lint
* test crt and zephyr added
* fix func registery size
* moved autotune test and fixed
* fix crt test
* address comments
* change relay text
* change relay in text_zephyr
* class added
* changed relay module in tutorial and cleanup
* address comments
* address TK comments
* change fork
* final comments
* retrigger due to flahy test
* fix tutorial
* retrigger
* fix changes due to merge
Co-authored-by: Andrew Reusch <areusch@octoml.ai>
* Add sse4/avx2 support for vpmaddubsw/vpmaddwd/vpaddd
- Extend the list of different target for x86 topi
- Extend tests for conv2d x86 int8 for fast i8 x86 platforms
* fix code style
* Change x86-64-v2 to nahalem in test to support llvm11
* Change test target to get NCHW8c
* [PROFILING] Profiling over RPC
Allow for profiling over RPC by serializing the returned report before
sending it. Also remove collectors argument when profiling over rpc
because it cannot be serialized.
* lint
* fixes
* add comments
* Add missing tvm.micro.project_api module file. The missing
__init__.py makes it impossible to import this module with
`import tvm.micro.project_api`.
* This uncover 30-ish linting errors, which are also fixed here.
* fix visit_attrs equals nullptr on python container object
* add a test a for python container object about function dir and getattr
* change test_ir_container.py to the pytest style
* update the style to fix ci error
* update the style of ir container to fix ci error
* 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>
Add info() method to TemplateProject class so it's possible to query all
available options for a given template project without creating a new
one. This is necessary because TVMC will query the available options for
a given template project to show them to the user so the user can use
them to finally create a new project dir.
That is also useful in general to query the available options for any
project type. For example, one can query all boards available on the
Zephyr platform with:
import tvm.micro.project as project_api
template = project_api.TemplateProject.from_directory(ZEPHYR_TEMPLATE_DIR)
boards = template.info()["project_options"][8]["choices"]
where 8 element refers to the "zephyr_board" option.
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
* [UnitTest] Added ids argument to tvm.testing.parameters
This matches the usage in `tvm.testing.parameter`, and allows for
parameter sets to be referred to by a single name.
* [Pytest] Fixed ordering issue of tvm.testing.parametrize_targets and known_failing_targets
If an explicit list of targets is given, then the
`known_failing_targets` decorator would fail to apply. This commit
resolves the issue, and cleans up all target-specific marks to apply
in `tvm.testing.plugin._add_target_specific_marks`.
* [UnitTest][Vulkan] Runnable relay unit tests on Vulkan
This commit allows the relay test suite to be run targeting Vulkan with
`TVM_TEST_TARGETS="vulkan -from_device=0" pytest tests/python/relay`. All
tests that require a specific environment are skipped if that environment
isn't present. All tests that are known to fail when running on Vulkan
are marked as expected failure, and will be tracked in
https://github.com/apache/tvm/issues/8903.
- Failures during code generation
- Type mismatches, boolean vs int8
- tests/python/relay/test_any.py::test_any_reduce
- tests/python/relay/test_op_level3.py::test_sparse_reshape
- tests/python/relay/test_op_level4.py::test_reduce_functions
- tests/python/relay/test_vm.py::test_cond
- tests/python/relay/test_vm.py::test_simple_if
- Incorrect strategy selection, picks NCHWc implemenation for NHWC layout
- tests/python/relay/test_op_level2.py::test_conv2d_run
- Unresolved CallNode operation
- tests/python/relay/test_op_level1.py::test_unary_op[erf/tan/atan]
- tests/python/relay/test_op_level3.py::test_scatter_add
- tests/python/relay/test_op_level3.py::test_segment_sum
- Generates 64-bit calls to GLSL that have only 16-/32-bit support
- tests/python/relay/test_op_grad_level1.py::test_log_softmax_grad
- tests/python/relay/test_op_grad_level1.py::test_softmax_grad
- tests/python/relay/test_op_grad_level1.py::test_unary_op
- tests/python/relay/test_op_grad_level10.py::test_cross_entropy_grad
- Codegen raises error for variable size
- tests/python/relay/test_any.py::test_any_batch_matmul
- tests/python/relay/test_any.py::test_any_conv2d_NCHWc
- tests/python/relay/test_any.py::test_any_dense
- Failures when running
- Numeric differences (observed on GTX 1650 with NVIDIA driver)
- tests/python/relay/test_op_level3.py::test_take
- tests/python/relay/test_op_level5.py::TestCropAndResize
- tests/python/relay/test_op_level5.py::TestResize1D
- tests/python/relay/test_op_level5.py::TestResize2D
* [Hexagon] Add support for linked-in model parameters
* Remove entry_func, since it's not used anywhere
* Simplify linked-param codegen preparation a bit
* Detect multiple linked-params functions
* Add testcase to check for linked-param codegen
* Empty commit to restart build
* Fixed LowerThreadallreduce not remapping Store buffer var
* reenable warp reduction schedule for softmax with fused ops
Co-authored-by: masa <masa@pop-os.localdomain>