* [QNN] Add qnn op for abs to solve wrong scale on quantize
* Fix for pylint to allow redefine abs
Co-authored-by: Michalis Papapdimitriou <mpapapdimitriou@octoml.ai>
* Add RNN operation for ONNX frontend.
* link checks
* rm test_rnn_batchwise in unsupported_onnx_tests
* merge similar codes to class methods
* implement opset 14 and refactor test_forward
* reformat verify_rnn_helper
Co-authored-by: 张亦驰 <zhangyichi1@corp.netease.com>
Motivation: when two IR objects fail a structural equality check, currently there is no easy way to
find out which part of the IR caused the mismatch. In this PR, we modify the `StructuralEqual`
infrastructure to also optionally return a pair of `ObjectPath` objects that point to the mismatch.
(See https://github.com/apache/tvm/pull/11977). In the upcoming PRs, we will pass these paths to the
TIR printer, so that it could highlight the mismatch location nicely.
Tracking issue: https://github.com/apache/tvm/issues/11912
* Check auto tensorization applicability in MultiLeveltilingwithintrin
* fix qbert loader
* add MultiLevelTiling rule in integartion test
* unused import
* fix cpp format
* add more test
* Check for tiling failure
After #11427, `tvmc compile` wouldn't work for external codegens that
don't have a `Target` registered by `TVM_REGISTER_TARGET_KIND`. Such
external codegens can be expected to have no workspace pools and may not
always have a target associated as their implementation predates this
mechanism. While it is likely a `Target` is specified for all external
codegens in the future, we should still support external codegens
without an associated `Target` until this is enforced.
Co-authored-by: Chris Sidebottom <chris.sidebottom@arm.com>
* [ETHOSN] Upgrade NPU driver stack to v22.05
In updating the driver stack to v22.05 some additional things needed
changes:
* Prevent split being offloaded to the NPU which is not supported in
v22.05.
* Removes compile algorithm configuration option since this was removed
in v22.05. Versions before v22.05 will use the default option.
* Managing some API changes.
* Updating network compile hashes.
* Updating expected error message for overall scale bounds check.
Change-Id: I09343c398a1f47dec44e135ff8252a6315a9b63f
* fix decorator evaluation order
Change-Id: Ib1a34093b4011bdc20fca47d474eb1786218de98
* Return none if version doesn't exist
For some reason PyTest evaluates the second skipif decorator even
if the first one marks the test to be skipped. Thus, meaning test
collection fails when we want to check the version. The workaround
is to return None when the version is not available.
Change-Id: I7cdd8cc70a9ee3c193e9a900f1011829538d975b
* Update resnet hash after rebase
Change-Id: I7555c4a4d7db4f6c7aa8d476e39277fc5cba2f0d
This PR adds `tvm.testing.CompareBeforeAfter`, a generalization of the `BaseBeforeAfter` utility previously used in `test_tir_transform_simplify.py`, which performs unit tests that perform a transformation on a TIR function and compare the results to an expected TIR output. This arose when minimizing the boilerplate required for unit tests in the implementation of https://github.com/apache/tvm/issues/12261.
- test_aot_legalize_packed_call.py: `T.preflattened_buffer` returns `void`
- test_tir_intrin.py: `type` here should be `buffer_type`
- test_tir_transform_flatten_buffer.py: `extents` should be `list`
- test_tir_transform_hoist_expression.py: change `tir` into `T` and register `Let` expression in `script/tir/intrin.py`
- test_tir_transform_storage_flatten.py: `T.allocate` has no argument named `strides`
* [ROOFLINE] Add CUDA support to roofline analysis
Add functions to estimate peak flops and bandwidth for CUDA. Add a new
registration mechanism to the roofline analysis to support adding any
target. This mechanism uses generic functions with overrides. New
targets only need to add `estimate_peak_bandwidth` and
`estimate_peak_flops` functions.
Also fix cuda codegen and tensorcore_infer_fragment.cc to support
filling matrix_a and matrix_b fragments.
* formatiing
* move statement back inside loops
* print out report for debugging
* default to avx2
* review comments
Previously we use ANSI color sequences to highlight TVM script. In jupyter notebook environments, such color sequence will be recoginized and translated to corresponding HTML to display things.
This works fine for most notebook environments (including the jupyter notebook and the VS Code plugin). Recently, thanks to @tqchen, we found that Google Colab does not well support ansi color sequence for 24-bit colors (`JupyterLight` and `VSCDark`) that all its displayed colors are unexpectedly black/gray/white. To also bring highlighting in Colab, in this PR, we directly render the highlighted code with HTML when a notebook environment is detected.
* feat(ux): highlight tvm script
* resolve dependency
* refact(tvmscript): highlight fallback as plain text with warning; put ansi colors as default terminal style
* refact(tvmscript): make terminal style close to the default notebook style
* fix(pylint): disable=import-outside-toplevel
* fix(ci-dep): Pygments>=2.4.0 to support ansicolors w/o #
* refact: making Pygments versioning most robust and user-friendly
* fix: pylint var naming
* Remove warning from Teensy boards
* Use a real timeout
* Skip assertion of whether a functional schedule exists
* Don't specify least significant digits for Teensy boards
This PR addes:
- All ExprDoc subclasses
- Their Python bindings
- Support of ExprDoc in PythonDocPrinter
- Unit tests for ExprDoc in PythonDocPrinter
Tracking issue: https://github.com/apache/tvm/issues/11912
This updates the version numbers after the v0.9.0 release and adds a version selector option for the v0.9.0 docs.
Co-authored-by: driazati <driazati@users.noreply.github.com>
* [TVMC] Workspace Pools Parameters
Attributes from tvmc are now passable into the created PoolInfo objects
inside WorkspaceMemoryPools. This is passed in to relay.build that get
attached to IRModule attribute.
* [TVMC] Workspace Pools Parameters
Address comments, fix linting. Testing improved.
Change-Id: Iea79329b6b9ec1cbc51e5c293449bf6dd43b00c5
* [TVMC] Workspace Pools Parameters
Update workspace pools test naming
Change-Id: Ib698d6248be1e6f44340f27db3641c985bc5c5d8
* [TVMC] Workspace Pools Parameters
Add test for parameter overrides.
Change-Id: I67d5470dcfbfbc9ab27f34e20a9269d2070193ca
* [TVMC] Workspace Pools Parameters
Rebasing over #10189
Updates to the way a WorkspaceMemoryPool object is created
Change-Id: I1f0e1d240343af311ddb3ed5c564cc1ab329f463
* [TVMC] Workspace Pools Parameters
Fix linting, fix CI
Change-Id: If75f8709ac4ad925655eca54b3e5c1bb09d025e8
* [TVMC] Workspace Pools Parameters
Add mcpu and mattr to target registry for cmsis-nn
Change-Id: I15257b8d01624c071c738cab6d12ecb84ed6cb16
* [TVMC] Workspace Pools Parameters
Added test for override on single pool when multiple pools are present
Updated functionality of parsing multiple attributes
Change-Id: I2c0745051b7a923dd7f75040bfb89bbc99376a11