Commit Graph

3585 Commits

Author SHA1 Message Date
Jocelyn S 480fa744eb [Onnx] Round operator (#11446)
* banker round op added based off tutorial

* black'd onnx.py file

* retriggering CI with empty commit due to autoscheduler test failure

* removed youtube link in comments

* retriggering CI due to test failure that passed locally
2022-06-02 10:15:04 -07:00
ChunPing Chung 4f5ab57d34 [Frontend][ONNX] Fix softmax converter when input shape is dynamic (#11507)
* [Frontend][ONNX] Fix softmax converter when input shape is dynamic

* [Frontend][ONNX] mark dynamic softmax tests as xfailed with cuda
2022-06-02 09:28:38 -07:00
mhyang-pllab e60849c899 Add ceil shape registration (#11533) 2022-06-02 16:53:15 +09:00
Sergey e84f163f57 [TE] Optimized version of concatenation layer (#11341)
* [TE] Optimized version of concatenation layer
     1. Concat implemented using extern_op
     2. New tests added.
     3. Workaround to allow inline extern_op-s with other layers.

* *test fix

* test_any.py fix.

* test_forward.py from tensorflow fix.

* lint fix.

* Fixes after code review.

* New comment added.

* Lint fix.

* Another lint fix.

* Comments added.

* rebase issue fix.

* Restored previous state.

* Update after code review.

* After code review changes.

* lint review.

* Change strategy for cuda to fix tests.

* Rebase to main

* Comments changes after review.

* Some more comments fixes.

* One more error fix in comments.

* restart build
2022-06-02 05:13:41 +09:00
Nicola Lancellotti ee26ecf1d5 [microNPU] Add transform matrices and part matcher to identity op (#11453)
* [microNPU] Add transform matrices and part matcher to identity op

* Address comments

* Enable cascader in identity tests

* Address comments
2022-06-01 15:51:56 +01:00
Junru Shao a71536a130 [MetaSchedule] Enable Task Filtering (#11512)
This PR allows `relay.backend.MetaScheduleExtractTask` to take an extra argument `filter_func` which filters out tasks that don't need tuning. The counterpart of AutoScheduler is `traverse_to_get_io_tensors`.
2022-05-31 15:57:30 -07:00
Mehrdad Hessar 2252f958f7 [microTVM][ARM][Zephyr] Add CMSIS dependencies in Zephyr project build (#11362)
* Test with CMSIS build added

disabled conv2d_nhwc_dsp.arm_cpu for non integers workloads

added debugging feature to TempDirectory

* revert arm_cpu strategy changes

* Address Andrew comments

* change copy to include

* add cmsis_path only as project option
2022-05-31 13:27:01 -07:00
wrongtest c1b22eefb5 [Arith] Merge surjective/non-surjective iter mapping detections (#11287)
* simplify (x * 96) % 64 to (x * 32) % 64

* adapt merge mulmod opt for OffsetOf computation

* merge DetectIterMap and DetectIterMapPadded

* adjust related interfaces for IterMapLevel

* - check incompatible left paddings
- determine case like x % 16, x in [0, 5) to be non-surjective, since usages may treat the region extent as 16 by mistake.
- skip second round of rewrite when there is no padding
- fix some typo in comments

* rebase upstream
2022-05-31 11:50:00 -07:00
Steven S. Lyubomirsky bc14f26aca [Frontend][PyTorch][Bugfix] Ignore Cuda in PyTorch version number when comparing versions (#11511)
* Do not consider cuda in the PT version number

* Add docstring
2022-05-31 08:53:00 +09:00
Manupa Karunaratne 119afda634 [microNPU] add E2E tests with cascader wo striping (#11410)
This commit adds end-to-end tests using the cascader
w/o striping. It needed few adjustments to the order
in which the arugments are provided to the entry point
function in AoT when both memory pools and devices
are present.

Change-Id: I37e04afd635add895e317586f628a62cae75f3fa
2022-05-30 16:31:23 +01:00
Eric Lunderberg d0b3ec93f9 [TVMScript] Allow T.Buffer[] arg annotation to use int as shape (#11454)
* [TVMScript] Allow T.Buffer[] arg annotation to use int as shape

Both the function `tvm.tir.decl_buffer` and the TVMScript
`T.match_buffer` expression allow a `PrimExpr` to be passed as the buffer
shape, which is interpreted as a 1-d buffer of that size.  This allows
the same behavior to be used in the `T.Buffer` syntactic sugar.

(e.g. `A: T.Buffer[16, "float32"]` instead of `A: T.Buffer[(16,), "float32"`)

* Fixed round-trip when buffer size contains an expression
2022-05-30 16:13:50 +09:00
Wuwei Lin d4a396825b [TIR] Add schedule primitive TransformBlockLayout (#11485)
* [TIR] Add schedule primitive TransformBlockLayout

* fixup! [TIR] Add schedule primitive TransformBlockLayout

Fix doc
2022-05-29 12:12:17 -04:00
Masahiro Masuda 2389f1f0d8 [Software pipeline] Fix hardcoded index in access_ptr rewriting, add a GPU test with depth 4 (#11495)
* fixed hard-coded index in software pipeling

* fixed three-stage pipeline test

* add three stage pipelined gemm test

* refactor mma test

* use mma_4k schedule utility in test

* apply pipeling annotation

* black

* require ampere in test
2022-05-28 09:47:45 +09:00
Mark Shields afb67e64a1 Silence unnecessary 'host' deprecation warnings (#11499) 2022-05-27 17:10:40 -07:00
Yuanjing Shi 80d9549190 [Meta Schedule] Fix testing issues for models with more than one inputs (#11298) 2022-05-27 16:41:54 -07:00
Tianqi Chen 2e1666d386 [FFI][CYTHON] Release GIL when calling into long running functions (#11461)
Unlike ctypes, Cython by default do not release GIL when
calling into C API functions. This causes problems when the
function is long running. As the particular calling thread will
block other python threads by holding the GIL.

This PR explicitly releases GIL when calling into possible
long running functions. It fixes the timeout issue in
PopenPool which previously relied on another python thread
for timeout.

Added a regression test-case by changing sleep to sleep
in FFI, which previously will indefinitely block the popen tests.
2022-05-27 11:14:50 -07:00
Masahiro Masuda 6f3c8bda06 [CUDA] Allow dynamic shmem of size > 48K in runtime (#11478)
Currently, we have functioning dynamic shared memory support on cuda. But we haven't actually explored allocating more than 48KB of dynamic shmem. 

This PR updates the cuda runtime to support launching a kernel which wants to use dyn shmem of size > 48KB. This is already useful for manually rewritten schedules, but to integrate this feature into tuning requires more work (see the discussion on `VerifyGPUCode` below). 

I'll add a test which actually uses a big dyn shmem in the next PR (need to fix one bug in software pipelining transform). 

Reference in cutlass code:
https://github.com/NVIDIA/cutlass/blob/master/include/cutlass/gemm/device/gemm.h#L479-L482
2022-05-27 10:40:23 -07:00
Suhail Alnahari bc492acd76 fixed tuple error (#10216)
Co-authored-by: suhail <suhail@expedera.com>
2022-05-27 09:22:14 -07:00
Sebastian Boblest 7766ab2cc4 Add unidirectional sequence lstm (#11183)
* UnidirectionalLSTM added

* fixed missing import

* fixed pylint warnings

* black formatted tflite.py

* corrections according to reviewer comments

* fixed black formatting

* just to trigger the CI again

* assertion now tests that there are exactly 24 input tensors.

* black formatted tflite.py

* added explanatory comment regarding unused imports

* removed unused import

* nothing

* nothing

* added some details in a comment about the differences in unbind regarding to the version in common.py

* improved comment on unbind

* fix of black issue
2022-05-27 09:21:30 -07:00
AndrewZhaoLuo 4a769c1da3 correct doc (#11439) 2022-05-26 14:07:20 -07:00
Sevin F. Varoglu b535e46f16 [ONNX] Add MeanVarianceNormalization op (#11444)
* [ONNX] Add MeanVarianceNormalization op

* Add pytest.main([__file__])
2022-05-26 10:56:02 -07:00
Mark Shields db5f4fe65c [Runtime] Add 'static_library' runtime::Module (#11442)
(See https://discuss.tvm.apache.org/t/byoc-supporting-cutlass-byoc-with-collage/12796/6 for
context, which in turn is part of Collage (https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md).

This adds a new 'DSO exportable' runtime module representing the contents of a .o file. It
allows external codegen toolchains to yield a result which:
 - Like CSource modules, can be conveyed directly to the final export_library compilation
   step for linking into the final .so and saved to a know location without risk the
   underlying code artifact will be lost.
 - Like DSOLibrary modules, are self contained so that no additional compile-time arguments
   need be conveyed from the CSource module to the final export_library command line

Since this is the third flavor of 'DSO exportable' module, add a Module::IsDSOExportable.

Since adding the above, can't resist also adding a Module::ImplementsFunction virtual and
calling it from TEComplier to check if an external codegen function actually provided the
implementation it promised.

Note:
 - I've left the existing implementation of runtime.load_module alone which
   relinks .o files to .so files.
 - Though also contained in the .o metadata, I require static libraries to always
   carry their list of exported function names.

This is all pretty stop gap pending a good rework of TVM to supoprt the notion of artifacts
and, perhaps, build rules.
2022-05-26 12:26:05 -04:00
Luke Hutton f6ddd52dc0 [microNPU] Expose compute cycle annotations to TIR lowering (#11288)
* [microNPU] Expose compute cycle annotations to TIR lowering

Adds an AttrSttmt "compute_cycles_hint" to each NPU operation for later
passes to consume.

Change-Id: I09779bdab6de6ef2094db610bb20d6e052e68ee3

* compute_cycles->compute_cycles_hint

Change-Id: Iebd71e699522e92a28fd321ffdb41ed7924db4e0

* add test to check annotations in compilation flow

Change-Id: Idcdcc8c8b5536c4732f297246b71aa8378a2732c

* add compute cycles hints for copy operations

Change-Id: I007ba19732e16081fa2ea9baca40c64a653c93cf

* fixing annotations for copies and improving test coverage

Change-Id: Ib812c4151fab03f4c1adcc016b4e798003a22e5e

* rebase

Change-Id: I653101908706096ae25ad1ebf08e7b6c4f1196c7
2022-05-26 12:21:22 +01:00
Youlei Yang 8135860527 [BYOC] Enable bfloat16 in DNNL BYOC (#11111)
* refine the code style (#10112)

* support more data types in oneDNN BYOC

* consider dtype when query layout

* support more translation of blocked layout

* refine log for invalid layout transform

* reset N and C for the weights

* support multi-blocking in TransDims2Plain()

* add tests for bf16 oneDNN BYOC

* unregister 'round' OP in oneDNN BYOC

* restore the criteria for fp32 tests

* disable test_prune_dnnl_subgraph for bf16

* fix typo in dnnl.py

* delete tag::format_tag_last

* delete 'is_weight' in layout2tag()

* reuse dtype_dl2dnnl()

* fix lint errors

* change to WARNING for invalid laytout transform

* skip bf16 tests if AVX512 is unavailable
2022-05-26 16:35:23 +09:00
Eric Lunderberg 814f5501bf [TIR][Schedule] Transform layout quality of life (#11269)
* [TIR][Schedule] Added Schedule.transform_layout_sugared

* [TE][TIR] Reduced duplication in TE/TIR layout transformations

Previously, the implementations of `tir.IndexMap.from_func` and
`te.Stage.transform_layout` had significant duplication to handle
argument parsing.  This commit extracts the shared logic into
`tir.IndexMap`.

* Enabled *args in Schedule.transform_layout_sugared

* Fix lint error

* Allow Schedule.transform_layout_sugared to set axis separators

* Merged transform_layout_sugared functionality into transform_layout

* Fix lint errors

* Fix lint error

* Fixed docstring errors

* Updated/tested TransformatLayoutTraits::UnpackedAsPython

* Disabled exec-used check for running trace.as_python()

* Updated SetAxisSeparatorTraits::UnpackedAsPython

* Updated unit test that was added in merge commit

* Fixed the argument name for TensorizeTraits

This wasn't checked before, but was the only other issue caught by the
updates to verify_trace_roundtrip.

* Re-enable type checks of transform_layout/set_axis_separator

Disabled while waiting for https://github.com/apache/tvm/pull/11289,
which was required for the `Tuple` argument.

* Updated a few additional transform_layout usages from main
2022-05-25 17:19:33 -07:00
Wuwei Lin 8a93eaffd1 Fix type checking annotation for Union type (#11430)
* Fix type checking annotation for Union type

* Update _type_checker.py
2022-05-24 14:33:52 -07:00
Wuwei Lin c1fc68715a Fix typo in typing of space generator (#11424) 2022-05-24 16:02:09 +09:00
Josh Fromm 51c44ff1d6 [Topi][Relay] Support for FP16 ERF on CPU. (#11413)
* Functionality and tests implemented

* Formatting and lint.

* Typo fix.

* Reduce strictness for fp16 tests.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-187.us-west-2.compute.internal>
2022-05-23 15:40:03 -07:00
Florin Blanaru 553eb1acd0 [tests] add utility to replace direct call to pytest.main (#11393) 2022-05-23 11:52:22 -07:00
Mark Shields d1467777c6 Finish support for list-of-targets (#11382)
* Finish support for list-of-targets

This finishes the work started in https://github.com/apache/tvm/pull/11173 to support
'external codegen' targets in the N build-like API surfaces.

 - It turns out it's ok if a build is given only a single 'external codegen' target, so remove that check
   in CompilationConfig::Init. When Collage builds a 'candidate partition' it does so for a single target.
   As far as Collage is concerned it does not care whether the target is regular (eg Target("cuda")), or
   for a specific external codegen (eg Target("cutlass")), it just passes the target into the build.

 - Add CompilationConfig::FindPrimitiveTargetForKind which I'll later need to retrieve
   the external codegen Target instance corresponding to a "Compiler" attribute value.

 - Target.update_target_host_consist was supporting three API styles:
    - single target
    - map from device type to target
    - map from target to IRModule (for the ir_to_runtime API)
   I replaced all those calls with a more specialized 'canonicalize' call:
    - Target.canonicalize_target_and_host
    - Target.canonicalize_multi_targets_and_host
    - Target.canonicalize_target_map_and_host
   In particular, all the tuning interfaces (task extraction, tuning, tuning records) all explicitly
   *do not* support multiple targets since the underlying code just doesn't support that.

* - Lints
- Revert unintended changes

* - more lints

* - Fix model_library_format handling of target.
- Improve comments in compilation_config.h

* - Lints
- Update target/target_host params documentation

* - Fix micro library format tests
- Rev micro library format from 5 to 6
- Use Target.current() in a few places

* - eta contract comprehension

* - Woops, one more device: target map left
- Handle host already being in Target

* - lint

* - lint

* - Bug with append
- Take device type from target

* - Fix hexagon
2022-05-23 09:14:28 -07:00
Siyuan Feng 4626a61fe2 [TVMScript] fix typo for block syntax (#11407) 2022-05-23 11:00:52 -04:00
Florin Blanaru df632baa78 [Tests] Replace the Relay interpreter with the VM in the op tests (#11386) 2022-05-23 19:14:00 +09:00
Christoph Gerum 83c9ee1a26 Fix int8 cuda kernels on older SM versions (#11389)
* Fix int8 cuda kernels on older SM versions

* Update target.py

* Simplify initialiasation of do_tensorize

* Simplify initialization of do_tensorize dense

* Simplify initialization of do_tensorize in group_conv_nchw

* Fix tensorize for conv2d_int8 as well.

* Try to make linter happy

* make linter happy

* Fix wrong commit to auto_scheduler
2022-05-23 19:12:46 +09:00
Siyuan Feng bbc6ba362f [Meta Schedule] Add Auto-Thread Binding Rule (#11177)
The current meta-schedule uses a PostProc `RewriteUnboundBlock` to auto-bind blocks to threads. However, it's a post proc, which means there are no search opportunities, and always splits with `factor=1024`. 

This PR adds a new search rule called `AutoBind` to do a similar thing to bind threads with sampled factors. Also with a corresponding mutator. 

After applying this rule, we get some positive perf results (on RTX-3080):
Element-wise: from 2.76 us to 2.48 us
Conv2d Winograd: from 29.45 us to 18.96 us (ansor 22.00 us)
Resnet18: from  0.591 ms to 0.531 ms (ansor 0.565 ms)
2022-05-20 18:57:37 -07:00
Masahiro Masuda 0274d8e1f1 [TIR] Support tensorization using ldmatrix + MMA (#11355)
* [TIR] Support tensorization using ldmatrix + MMA

commit 3218facf100b0dfc55715acfd1cee156764129ba
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 14:04:56 2022 +0900

    some clean up

commit 7a235b69dc2023b3098ed44d591edb63b20a8f4e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 13:55:11 2022 +0900

    parameterize over storage scope in mma store intrin

commit 827ea4c434c35607b241f8e0ae2efe3214ac2458
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 13:37:38 2022 +0900

    properly handle floordiv/mod in codegen

commit 42d4c6f42182c9fd79566c0955f99cc82abd5144
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 09:53:57 2022 +0900

    update tuned factors for fp16

commit 328d0aa36b2ea9ea1b051970d612bff82d2d20e6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 08:43:30 2022 +0900

    all tests working

commit 5e086cf5fd1404ac38f85c4bfbe692687b45a16c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 07:48:43 2022 +0900

    add doc for mma_fill and mma_store intrin

commit 4f945c4116b6d3bdc965ecb2be2229bb46dc11ab
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 18 06:39:01 2022 +0900

    remove tests

commit df7708f7f67761d9c18f9564bc15abd50c12ac69
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 19:52:14 2022 +0900

    unified test

commit 754c83eeb8510b31fb9652b089177f9b8e642ec0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 19:36:24 2022 +0900

    clean up LowerWarpmemory

commit 178c3dcee7bfa17d5d93fec02aa858dc62151670
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 19:15:04 2022 +0900

    Use IndexMap

commit 07fb58910338c62847fd902b37801d09b8c673b0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 17:51:44 2022 +0900

    remove 16x8x8 test

commit 2b05b5a5470ac221d559f31a31a8e2ff753b2414
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 17:31:35 2022 +0900

    generate mma fill/store

commit bf23fc50f0ffa99e875d9247ca66acec0c36677f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 12:23:30 2022 +0900

    mma intrin generation with meta programming

commit 5afb5f00afd642cb1e39872edc7965f476dcdcb7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 17 05:26:14 2022 +0900

    ldmatrix intrin generation with meta programming

commit fb62abb3424b88ec48c697e306e05889a3ac306f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 20:30:49 2022 +0900

    minor

commit 5a80adce24e84d3ec6bf931b60cb9c730d243394
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:55:57 2022 +0900

    revert some change

commit e599a55078ee75f2480a721098341812db58cf6f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:54:18 2022 +0900

    remove obsolete files

commit 4b13b85ff91d0d592a7e0c01924e0b49b82f35a8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:51:21 2022 +0900

    wip

commit 848de63455539e25cd0d43e5a65fd048636ef0f7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:44:29 2022 +0900

    wip

commit b35bff97ed10c22559e2164eb7538db0f711ce7e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:31:18 2022 +0900

    update parse error msg

commit ad9b053ef865b1f91f03d7b15ed7aae3420ee213
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 19:26:51 2022 +0900

    fix for avoiding Buffer.vload(...) case

commit 54c686443e370edbfae860d0809b1b6182d26414
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 18:59:55 2022 +0900

    wip

commit 078060fe28d22f1db5f07b1c382dee438f02df60
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 18:57:34 2022 +0900

    wip

commit 576f8415e65e0e8a8a7808885e219b3b53867950
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 18:52:15 2022 +0900

    wip

commit 12a376ae2f44aa6660121e64e0358f2866624f7f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 17:54:58 2022 +0900

    Squashed commit of the following:

    commit 48eef4981d1a55aaf3b0ac935f2a10347cb1ac2d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Mon May 16 17:40:48 2022 +0900

        more comment

    commit 8f67fc87038834e9f7e2c5cd3dfe61fabf442206
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Mon May 16 17:11:27 2022 +0900

        update test

    commit ad85036621c005b733763e67ceffae39c356ec99
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Mon May 16 16:54:01 2022 +0900

        add test

    commit 4a5dc3ffd5d0bb4a1700e57897c9e0f26e3d2a88
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Mon May 16 16:40:47 2022 +0900

        [TVMScript] Support function call to help construct AST

commit 76c1bcf0ade45d7433a0066236add8372b1cc547
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 16 16:30:07 2022 +0900

    simplify iterator in layout transform

commit 936280324ea2c91429a6a85a1b8ee89c7b825928
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 11:31:39 2022 +0900

    remove obsolet files

commit 2e119b422d72d726d5f2bd20fe48a1e62fcb0510
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 10:43:59 2022 +0900

    calculate mma store dst index using inverse affine map

commit 9489434ee52b546e2abb2ab28173eefd51525ba4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 10:01:12 2022 +0900

    simplify store

commit 1adcb77b8bba8e5d91080fe6cbfc7add7f4365c2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 09:43:40 2022 +0900

    simplified fill

commit 7b13c736d23e0eac94137aa918101d788e60d4f3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 09:22:17 2022 +0900

    simplify intrin desc using index map function

commit bcf212dda0f94c51f55c48921f61d92fd3b83777
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 07:16:42 2022 +0900

    seems to work

commit dd8ccf9ec2e48100158152e5d4590d141424e2e2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 14 07:11:57 2022 +0900

    poking with the parser

commit 596582cbfbd08ebe23ea71aaf7a447472415ccd1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 20:04:59 2022 +0900

    16x8x32 4k trans working

commit 273f89a8a6ac34f7c79147563922d34d44bffd08
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 19:52:13 2022 +0900

    add 16x8x16 fp16 trans

commit 8e2066cc4c6e86616bc9751324e63ba81a3b02af
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 19:32:37 2022 +0900

    16x8x16 4k trans working

commit c2d0744051733e94f840d4517bcee9ca5d444c75
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 19:25:52 2022 +0900

    16x8x16 trans working

commit c2e314cdda1c3a931781e51a863901ea178dffec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 16:19:32 2022 +0900

    tuned int8 4k, 91 TOPS

commit 94d9d965f19ff1a2ebdd342079ef420fb537b16a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 15:59:33 2022 +0900

    int8 4k tune working

commit 3ca8ca02593aff7540c9655aa831348246171752
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 08:43:57 2022 +0900

    mma 16x8x32 int8 working with ldmatrix b workaround

commit 54f1cb731d4b42a6cbc08baf144e74646400eef5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 18:23:27 2022 +0900

    wip

commit 9d2844db602dc65af4dbd06a73fdd815f486b8b9
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 16:38:53 2022 +0900

    test tensorize without layout transform

commit 86ee6dabc801aeb8d6917bec6de97b42025dbdd1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 15:15:34 2022 +0900

    int8 4k tensorize works

commit 39f9e32c9a64222c91daba2c32969b27207a31d2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 13 12:44:39 2022 +0900

    begin int8 4k tune

commit 6fa91e55b5ab2ba0f901d0d35be1b2fb3ab092b0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 18:53:20 2022 +0900

    try fix ldmatrix b for int8

commit 7a962cddc4799fa3df0c0fdf3c056146d3f2cbdf
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 18:28:34 2022 +0900

    fixed warp_coeff

commit a0afb5698f307382147a38819e004a2db7f554b1
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 12:20:01 2022 +0900

    wip

commit f70ccd09b07d5325454ffdc39a7619ea84aa7e06
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 12:09:57 2022 +0900

    int8 tensorize working

commit 20321fa4674dabc78fe55b5e0e2876c35b245d21
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 07:06:22 2022 +0900

    starting 16x8x32 int8

commit 441fd193c59cdc436d87ab35896cbb8c779ddf35
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 12 05:50:46 2022 +0900

    adding fp16 accum case

commit c9d40b69b1b57bfaddffba09ea07624ae90ee465
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 17:04:29 2022 +0900

    clean up

commit 5b2d48635e762c77c824d1c259ac8bcbcc949421
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 16:38:19 2022 +0900

    16x8x16 4k tune working

commit c3cb170d85600d03da5c3f4cda03552208ca0b8c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 16:20:27 2022 +0900

    tensoriz fixed

commit 68039b081efcdd6aea1d132940b3745f50164974
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 15:55:25 2022 +0900

    begin 16x8x16 4k tune

commit ced5d8d980cc267d4735957c25cb60d71ae977d2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 15:50:11 2022 +0900

    16x8x16 worked

commit 3d2c90d77c1bb2df2193e9af6cbaa2bd927a26d8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 15:47:26 2022 +0900

    fix

commit 403050b03ad6b4f0ee8d45088ffb324727bbae48
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 15:45:10 2022 +0900

    add 16x8x16 test

commit 18e8d73661c99cd1c83021063b41a457afcb1638
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 06:50:32 2022 +0900

    fixed mma store codegen for 16x8x16

commit ec81250561195705122bccb9a2372f71de68121f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 04:25:25 2022 +0900

    add 16x8x16 mma store codegen

commit e08df2a62a4809bcd39782949283c16e7703aa5c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 03:47:47 2022 +0900

    tensorized C_warp init

commit ae0678918929c1ceec73f2039467040c5bb7823b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed May 11 03:06:06 2022 +0900

    mma store codegen working

commit deb4d6646cc93d4cdb4f2560ce723bee4d86e144
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 10 19:22:57 2022 +0900

    update lower warp memory

commit 71fe5fe465300705fa94f9544a2e1a5070de6e0d
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue May 10 09:01:42 2022 +0900

    tensorizing mma store

commit e80a1f148c47f2a3fac2363a733d8d4e2a2631d0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Apr 28 19:54:08 2022 +0900

    clean up

commit a9640f4b7c3c9f22b87ca74a61003438dfd8f992
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Apr 28 19:40:55 2022 +0900

    add tunable 4k test, 36 TFLOPS

commit b9f7eae7041d1a9b3e434c331c874e8347e89dc4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu Apr 28 18:01:08 2022 +0900

    fixed bug in LowerWarpMemory index splitting for ldmatrix

commit 00df30823f874910ed1ec1f74718100311764234
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Apr 27 07:58:17 2022 +0900

    fixed missing reverse_compute_at

commit 93f9fe7e5f7ad16c8d0e6240c16c0281a0e97dec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Apr 27 06:55:12 2022 +0900

    add 4k test

commit 3689ef712aa4b282a4818fa2fa2e7e349c3a5eec
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Wed Apr 27 06:54:09 2022 +0900

    temp disable high dim base indices check in tensorize

commit 0c859c4f385ba0b6f9477b569b80cee80b5b7282
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue Apr 26 19:18:23 2022 +0900

    clean up

commit f6aadbfcfbd73c1667a6de7aedc5894232b8e750
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue Apr 26 19:13:09 2022 +0900

    Add 16x8x8 MMA + LDMatrix test

commit 4cf6b20c6ca415e967ab58d80e4a77c701ad7255
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Tue Apr 26 18:04:17 2022 +0900

    testing 16x8x8 ldmatrix tensoriation

* set measure_perf to False

* add requires_gpu decorator in tests, always test build on non-ampere

* skip cuda compile on old gpu
2022-05-20 11:33:54 -07:00
Eric Lunderberg 72a5219aad [Schedule] Allowed typing.Tuple in tir.schedule._type_checker (#11289)
* [Schedule] Allowed typing.Tuple in tir.schedule._type_checker

Previously, `typing.Tuple` annotations could not be used with
`tir.schedule._type_checker.type_checked` annotations.  This allows
`Tuple` type annotations to be type-checked.

* Revert change, allow tuples input as List arguments

* Suppress mypy errors

Directly interacting with a type object would otherwise cause some
false positives.

* Corrected unit test for allowing tuples to be used as typing.List

* Represent multi-type lists as List[Union[...]] instead of List[Any]

This gives a better error message and plays nicely with _type2str,
since `typing.Any` doesn't have a `__name__` field.
2022-05-20 10:20:12 -07:00
Andrew Reusch 07d91fa041 Fix function number datatype from char to uint16_t (#11365)
* Fix function number datatype from char to uint16_t

rewrite the modified part to pass lint check

Use 2 bytes for func num in fun_registry

Fix errors in linter

Add the declaration of the helper functions

set 2 bytes for func num in func_registry test units

pass num_func by value

This commit change the datatype of the number of the function from 1 Byte to 2 Bytes.
Besides, I use some helper functions to access the number of function and the first function name.

* Fix aot_executor_module to unbreak CI.

* Fix GraphExecutorModule.

* Remove graph_json_to_c_func_registry.

 * No longer needed and not called anywhere.
 * Superseded by emitting the FuncRegistry directly in codegen.

Co-authored-by: 嚴中璟 <a1245967@gmail.com>
2022-05-20 18:12:55 +09:00
Jiawei Liu a6a34046c4 fix vec*mat in PyTorch converter (#11347)
* fix vec*mat in PyTorch converter

* Trigger CI
2022-05-20 13:45:25 +09:00
Mehrdad Hessar 5e29dddd02 [microTVM][ARM] Add Relay tests for conv2d registered schedules (#11250)
* Added conv2d relay test for each schedule
* Enable relay tests in qemu
* split aot test utils
2022-05-19 16:09:51 -07:00
Farshid Salemi Parizi 8d0da24f12 [Hexagon] moves conftest.py to tvm.contrib.hexagon so outside repos can access the testing fixtures (#11277)
* adding pytest_plugin to python so other repos can access

* import requires_hexagon_toolchain from tvm.contrib.hexagon.pytest_plugin
2022-05-19 09:40:01 -07:00
heliqi ffc0443913 [Frontend] [PaddlePaddle] Add split operator (#11354)
* suuport split op of paddlepaddle

* black formatting
2022-05-19 17:53:03 +09:00
Mehrdad Hessar 9273ea5e49 [Hexagon]Refactor Hexagon_SDK_PATH (#11282)
* refactor HEXAGON_SDK_PATH and remove HEXAGON_GTEST
2022-05-18 13:06:11 -07:00
ah cheng 95509eed26 fix matmul broadcast (#11242) 2022-05-18 10:10:00 -07:00
Elen Kalda 2b1e5ce8dc [microNPU] Fix bug in channels extraction in the matcher (#11335)
* [microNPU] Fix bug in channels extraction in the matcher

If the input tensor layout is in NHCWB16, we were passing W value
instead of the channels to get_valid_block_configs.

* Add test for conv2d
2022-05-18 16:37:05 +01:00
Leandro Nunes f88a10fb00 [TFLite] Add support to int16 data type in TFLite frontend (#10915)
* [TFLite] Add support to int16 data type in TFLite frontend

Add support for int16 data type and int64 biases/accumulators in
the TFLite frontend.

Adjusts TFLite tests to cover int16 convolutions and element-wise;
Fixes a minor typo negtive->negative in the element-wise tests.

* Update src/relay/qnn/op/convolution.cc

Co-authored-by: Elen Kalda <elen.kalda@arm.com>

Co-authored-by: Elen Kalda <elen.kalda@arm.com>
2022-05-18 14:04:24 +01:00
Nicola Lancellotti 1b32245f0b [microNPU] Add a pass to reorder copy and compute nodes (#10959) 2022-05-18 13:22:30 +01:00
Luke Hutton 99caa6533f [TVMC][ETHOSN] Improve target string to avoid duplication (#11272)
* [TVMC][ETHOSN] Improve target string to avoid duplication

Improves the TVMC target string to avoid duplication of the
NPU variant. The new target string will require the just the NPU
name followed by -variant=n78. The old target string is deprecated
and will be removed in a subsequent version of TVM.

Change-Id: I4638f36788df3f478435ac13d3531aad2b23f204

* fix linting

Change-Id: I76a9da511899f24a163be669877605cd1a440022

* fix make variant functions and update test error message

Change-Id: Iff553d4b255c0ce0b86bad42eaa94ee9b1c62508
2022-05-18 12:17:47 +01:00
Masahiro Masuda a4be2ed904 [TVMScript] Support inlined function call as a sugar (#11324)
* [TVMScript] Support function call to help construct AST

* add test

* update test

* more comment

* fix for avoiding Buffer.vload(...) case

* update parse error msg

* wrap func call with try / catch, emit error msg

* silence pylint
2022-05-18 17:56:10 +09:00
Josh Fromm 75c31cae75 [Relay] Bug fix when applying history using an iterator or records. (#11306)
* Bug fix when applying history using an iterator or records.

* I forgot strings are iterables.
2022-05-17 16:17:48 -07:00
czh978 0e2f869eea logsoftmax reusing the softmax function (#11141)
Co-authored-by: caizihua <978497756@qq.com>
2022-05-17 14:08:08 -07:00