Commit Graph

2562 Commits

Author SHA1 Message Date
Tristan Konolige 96a7a5811f [TVMSCRIPT] Fix printing of rank 0 buffer access (#8215)
* [TVMSCRIPT] Fix printing of rank 0 buffer access

Also improve error messages and fix min/max/Select.

* fixes

* return fix

* remove print
2021-06-16 10:26:01 -07:00
Leandro Nunes 0fc5b7bfe1 [tvmc] Add a --config option to tvmc compile (#8253)
* Allow to send some configurations to the PassContext via command line

 * Add various validations to the new option with appropriate error messages

 * Add unit testing
2021-06-16 17:46:56 +01:00
senychen d05fdc527a Fix docstrings in tvm.relay.cast_like (#8262)
* Fix docstrings in tvm.relay.cast_like

* use correct formats to avoid chaos

* Fix docstrings in tvm.relay.cast_like

* use correct formats to avoid chaos
2021-06-16 09:12:49 +09:00
Mehrdad Hessar 5df25cf8db [microTVM] Add wait to QEMU Setup (#8236)
* add wait

* address comments

* address comments

* test added

* add suggestions

* fadd message assert for test
2021-06-15 08:46:56 -07:00
CircleSpin 9dd1286e91 Unify Python and C++ TIR lower API (#8110) 2021-06-12 06:57:38 -07:00
Rafael Stahl 3972c291e6 doc: fixes to dataflow_pattern (#8247) 2021-06-12 19:08:14 +09:00
Yanming Wang ab166855ff [TOPI][batch_matmul] Allow cblas batch_matmul implicit batch_size broadcast (#8250)
* Allow cblas batch_matmul implicit bcast

* Add cblas batch_matmul bcast when batch_a=1
2021-06-12 19:08:06 +09:00
Dmitriy Smirnov 8a0472fd3e [BYOC][ACL] Prevent dilated pooling (#8149)
* [BYOC][ACL] Prevent dilated pooling

 Added check preventing avg_pool2d and max_pool2d to be
scheduled for execution via ACL* runtime if dilation other
than (1, 1) is provided as ACL does not currently support
dilation attribute in pooling layer.

*ACL stands for "Compute Library for the Arm® Architecture"

Change-Id: If8f65d3a154e09f880bec73dd756d9f985a20ff2

* linter

Change-Id: If91809350786e69f59596301e0cbd3def6815cd0
2021-06-11 11:50:36 +01:00
Gustavo Romero c29301ea65 [µTVM] Zephyr: Fix missing board-specific config file in build dir (#8230)
Currently board-specific config files (boards/*.conf) are not
copied from Zephyr project dir to the destination build dir, so
as a consequence the per board configs are not used when building
the runtime libraries, like libcommon. Hence, for instance, it's
currently not possible to set CONFIG_FPU per board since it only
takes effect when it's set in the generic 'prj.con' config file.

This commit fixes it by copying to the build dir (to each lib
dir) the proper .conf for the selected target board. For example,
if target 'qemu_x86' is selected 'qemu_x86.conf' is copied to
the boards/ dir inside the lib dirs, so Zephyr build system can
find it and combine it with configs found in the generic 'prj.conf'.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
2021-06-11 15:06:47 +09:00
Egor Churaev 8ea6a30925 [Metal] Reduce number of threads for reduction layers (#8206)
Reduced default number of threads in reduction kernels for Metal.
Default code generation generated thread block with the following size:
32x32x1. With this size number of threads per threadgroup was equal to
1024 (32 * 32 * 1). Sometimes device doesn't have enough resources and
in this case we will get an exception that the block size is greater
than value of maxTotalThreadsPerThreadgroup.
To prevent such situation we decrease default number of threads. With
this fix every model should work with default codegen and auto-tuning or
auto-scheduling will select the optimal number of threads.
2021-06-11 07:57:46 +09:00
Lunderberg 217555f43c [AutoTVM] Added @functools.wraps to function decorators (#8237)
This helps in debugging, as the function name, arguments, and
docstrings show the function name from the source code instead of the
wrapper function.(e.g.
`<function tvm.topi.cuda.dense.dense_small_batch(cfg, data, weight, bias=None, out_dtype=None)>`
instead of
`<function tvm.autotvm.task.topi_integration.register_topi_compute.<locals>._decorate.<locals>.wrapper(*args, **kwargs)>`.)

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
2021-06-11 07:57:02 +09:00
Leandro Nunes a468f08d77 Add metadata information to the listing of PassContext configuration listing function (#8226)
* Rename PassContext::ListConfigNames() to PassContext::ListConfigs() and its
   Python counterpart tvm.ir.transform.PassContext.list_config_names -> list_configs()

 * Adjust PassContext::ListConfigs() to include also metadata (currently only including the data type)

 * Adjust unit tests
2021-06-10 11:14:05 +08:00
SerkanMuhcu d767659913 Fix use of wrong variable (#8227)
* Fix use of wrong variable

* Fix docstrings
2021-06-10 11:12:13 +08:00
Rohan Mukherjee 34e9a4fd68 [Frontend, Tensorflow, Tensorflow2] Tensorflow frontend op refactor (#8179)
* Refactoring the ops from Tf1 frontend

Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xiao <weix@amazon.com>

* Resolving an import bug and refactor

Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xiao <weix@amazon.com>

* Tf2 frontend importing from common ops

* linting and unused imports fix

* Applying changes from commit id f4ec5fd4ae

Author: Masahiro Masuda <masahi129@gmail.com>

Co-authored-by: Masahiro Masuda <masahi129@gmail.com>

* Minor linting

Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xiao <weix@amazon.com>

Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xiao <weix@amazon.com>
Co-authored-by: Masahiro Masuda <masahi129@gmail.com>
2021-06-10 09:25:38 +08:00
ziheng 4d9bc9b4a3 [RUNTIME] ShapeTuple Container (#8200)
* Add ShapeTuple.

* Update NDArray.

* Documents.

* Lint.

* Lint.

* Lint.

* Address comment.

* Address comment.

* Address comment.

* Lint.

* Lint.
2021-06-10 07:03:15 +08:00
Leandro Nunes 1f2ca068c7 Expose list of PassContext configurations to the Python APIs (#8212)
* Expose C++ PassContext::ListAllConfigs via its Python counterpart
   tvm.ir.transform.PassContext.list_configs()

 * Add unit tests for the C++ and Python layers
2021-06-09 12:07:45 -07:00
Lianmin Zheng 53e4c603e6 [DOC] Improve "Getting Started with TVM" tutorials and fix warnings (#8221)
* improve src/README.md

* fix intro

* fix more warnings

* improve docs

* update

* update

* update

* update overview image
2021-06-09 09:34:43 -07:00
Egor Churaev 5dc962711b [Metal] Remove matching Metal to OpenCL in tophub (#8211) 2021-06-09 10:11:11 -04:00
Honghua Cao 55459e74dd [TVMSCRIPT] Add tir.min node in tvm script (#8219)
Co-authored-by: honghua.cao <honghua.cao@streamcomputing.com>
2021-06-09 09:52:28 -04:00
Matthew Brookhart f646048c11 use an empty module for fold_constant (#8208) 2021-06-09 11:35:07 +09:00
Matthew Brookhart 9be0f4f13f [Relay] Convert a fake quantized or QAT graph into QNN ops (#8126)
* Convert a fake quantized or QAT graph into qnn ops

* fix pylint

* fix typos

* use an identify function for some ops

* rename the pass from quantize_fake_quantization to fake_quantization_to_integer

* add definition for affine
2021-06-08 13:31:59 -06:00
Rohan Mukherjee 64a8e81eee [Frontend, Tensorflow2] Adding TF2 frontend code with support for control flow ops (#8142)
* adding tf control flow ops with a different frontend code

Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Xiao <weix@amazon.com>

* Some minor fixes

* Fixing output order in TF2 outputs

Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Xiao <weix@amazon.com>

* Using black

* Refactoring

Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Rohan Mukherjee <mukrohan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Xiao <weix@amazon.com>

* resolving a bug with passing output tensors for Functional Graphs

* fixing multi output for graph runtime

* adding docstring edits

* linting + black

* linting + black

* linting + black

* removing unnecessary output propagation across function

* addressed comments in PR

Co-authored-by: David Huang <davhuan@amazon.com>
Co-authored-by: Srinidhi Goud <srinidhi.goud29@gmail.com>
Co-authored-by: Xingyu Zhou <zhoxingy@amazon.com>
Co-authored-by: Xiao <weix@amazon.com>
2021-06-07 17:44:20 -07:00
Andrey Malyshev 51bbd63840 Fix conv2d_nchw for opencl intel graphics (#8201) 2021-06-07 09:11:32 -07:00
Matt Welsh (OctoML) 072a3d236b Fix incorrect device name in TVMC. (#8181)
* Fix incorrect device name in TVMC.

* Rename gpu -> cuda.

* Bump CI.
2021-06-07 04:50:58 +09:00
Tianqi Zhang (张天启) 43387d0c31 fix bug in dense_nopack if dynamic input shape (#8166) 2021-06-05 10:13:56 -04:00
masahi f4ec5fd4ae [Relay, TF] Support converting TF combined_nms using Relay all_class_nms (#8174)
* import from branch

commit c86bcf48fa6acd19647a7a096b9e1a5d4e56cc74
Merge: 0fa88051b da75b2a52
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 12:13:29 2021 +0900

    Merge branch 'tmp' into all_class_nms_tf

commit 0fa88051b3d30337674a07e579b78e8cb254cd66
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:57 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b82f338300224b22f4d6bdda349e7aa5aca.

commit 67251504c652e36106718617c5ae8b42c61deffc
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 39549aa25267617671ca2a82ca517442065afe97
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit ca9470ba68e68c81902b0a3bad4bf5b5f0aa311e
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 47bdef9e0fcdbab4671dd46044be5acac24b2f2b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit 445a7daf1afb794be5f03473c70b172f06556d05
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit 71879b115b3bfe8087b73618bdab16fd61fbed86
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit 72e055a721ee7d698e7b3a3f58ab074ab78b57b2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit a1fe7c46d6bb77da51de24b46bec881ed19d4cb3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 0c659bf27f9b90dd53455abd0d24b42f86e802bb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit 480f6b782427dd46514efbf7028de4fb9f5ff9aa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit 2b441c391a25930092b55f12dadc31832400277b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit d43e801289621e71a79c71308dedeef0969264be
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit 025010e42110388d0de2bc2ffcd76fbe14a188fb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 787d8399ff160694ecd2c4a9721a5825ca945d81
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 05404305d1323b475829de10aa68f1f8791686cc
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b67c2d471a761f743e6ea5fa414c899bd3f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53f057e7bfd1c6dff31a81f866727bef855.

    commit 47a05c4c8f5a56a1685848210229aaa083b92880
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f02b25d658c94fa23e2cc65a9424ed8a1a5
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393939f1b8d8130f3815dc0f66223c9aa4f3
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5dfcf9b552fb2682534d82bbf638e661c0aa
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d2035626a72f8df71c514e3293337f6fda723353
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8846b6d2075ae1d9a162c4b70b08cc8024
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84690c0289c85001597046969d0c8dc92c2
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413a30.

    commit ce7848ba7def5a22659b09de039b2df12c0114f9
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd230ed4855b45fd739dfc86edc2335ec80
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b8491e0ce1c981a5059f28135319f96978d0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc6050dcbe59915a8f9b4f78b4aaf9fdba89a6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6128863d07e7dded71cc40077726faf2db
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225ce747c4e84452e6e7b32eeb0d71b2995d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211e7ef3ce520b8711a78cf7eb2af52e7acc
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5dfa5faeadbcdb882ff70039ea7bccb61a3
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53f057e7bfd1c6dff31a81f866727bef855
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b0200643a184294a2f2b3cce7208c4d257987424
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 456741790dd5e73f3f76ef7a5ede6e1014de8b2d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d0090950985888781f071ca341e2fa5695
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8dfbfdc65d7a6e77ed0a6e8b09af162b77ad
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f7b4de0c796d69f23084cd688e28f7b461
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1fdd15ed898b1f7299e99377cceaaee2732
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f77c9c230ee636aceb52547502319c8ad77
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365affac6667a02d15791a59040702f8990b
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617e48b062417b766d6400b0c6b856084cfa
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit da75b2a52e9a8daa322168d1b6026e144d42d5bb
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:58:19 2021 +0900

    do minimum in topi

commit 52c5e8a5bca56f93778990d4faa87c7e7b342ba7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:54:49 2021 +0900

    more simplify

commit 44d88cdecd87468b630fd16a7d1e1214e86eabfa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:51:39 2021 +0900

    simplify

commit 74e19174f1b2d40ee8f4d08c7a61667bc3dd69b5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:39:37 2021 +0900

    black

commit fc3a38e1cb699b66340c7742cb74188fdbe92bf5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:37:30 2021 +0900

    minor change

commit f88e2a3a98a7ee283622e57712e28634374e5e2c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:14:54 2021 +0900

    minor refactor

commit f2d7ed410a0b835586929706873ee1f448d1f955
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 07:08:47 2021 +0900

    support the case when there is not enough box

commit 0f184a6bf6e533c91d26c98a7a17f8d7970364cc
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 06:24:16 2021 +0900

    Revert "handling case when num detections is smaller than max_total_size"

    This reverts commit 61e70b82f338300224b22f4d6bdda349e7aa5aca.

commit d7180f27cfaffbbd1ab1ce970ca605133bc812ee
Merge: 61e70b82f 06ac2052a
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:37 2021 +0900

    Merge branch 'gather_nd_shape_func' into tmp

commit 61e70b82f338300224b22f4d6bdda349e7aa5aca
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:43:06 2021 +0900

    handling case when num detections is smaller than max_total_size

commit 453a79bd05f67653be8b90db80ecde12d343aea6
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:32:37 2021 +0900

    simplify frontend

commit 2fc5f1ed3de49266f1eb72aed25d26457da78491
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sun May 30 05:25:13 2021 +0900

    update op definition

commit 8afbd30c0fbbd40902acc4196a18b448f2a93266
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 19:47:04 2021 +0900

    remove unnecessary mask

commit ff870f7e972e289953ca0e5daa444c09e5095efa
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:54:19 2021 +0900

    remove in_buffer

commit e71b922b6cdf129ef51e91928635374a1f02a6fc
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:48:22 2021 +0900

    minor fix

commit b02faaead24d2d14d3b67bf04ee23f9df9bfecbe
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:45:37 2021 +0900

    make it more readable

commit 6baee99ed1b57be8da06c00e17d6b92083668ac0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:44:14 2021 +0900

    clean up

commit 7a2a2df8b696faf7c4280fd9a3f9fbdf8f5c3e03
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:33:54 2021 +0900

    improve sort on cpu

commit afad2a2e920c98d269c6000035f31392cff7b6a3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 16:29:53 2021 +0900

    collect indices and scores in one kernel

commit c5718e299a82ffe5e60bc1fee679b2b0405346e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:47:31 2021 +0900

    initialization bug fixed in cuda

commit 5623e3f8f71de1dbec55c83a300fa4131cd82aad
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 15:23:09 2021 +0900

    cpu nms bug fixed

commit c40eaecd87513a6869098ed95c03b8553c350414
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 11:09:47 2021 +0900

    add cpu impl

commit 6c7aaeb44f5586b57e7b1bfd7772d1b78a9eae1f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:38:20 2021 +0900

    refactoring

commit 7b87922279121f06cdcc77a41ac6c8f59b6d5549
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 29 10:03:51 2021 +0900

    initial import

    commit 5ff0985625ec75f117af37017ebf4089dafb8a46
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:02:45 2021 +0900

        cleanup

    commit 199f9b67c2d471a761f743e6ea5fa414c899bd3f
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 10:00:15 2021 +0900

        Revert "add gather_nd shape func"

        This reverts commit 1ff4d53f057e7bfd1c6dff31a81f866727bef855.

    commit 47a05c4c8f5a56a1685848210229aaa083b92880
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:53:00 2021 +0900

        format

    commit 9dcd0f02b25d658c94fa23e2cc65a9424ed8a1a5
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:48:43 2021 +0900

        make it static

    commit eb06393939f1b8d8130f3815dc0f66223c9aa4f3
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:14:31 2021 +0900

        restore old impl and use it for q != 1 case

    commit 115a5dfcf9b552fb2682534d82bbf638e661c0aa
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 09:00:40 2021 +0900

        fixed score gathering

    commit d2035626a72f8df71c514e3293337f6fda723353
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 08:53:14 2021 +0900

        minimum fixed

    commit 3fe91e8846b6d2075ae1d9a162c4b70b08cc8024
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 06:59:39 2021 +0900

        batch issue fixed

    commit 19e3e84690c0289c85001597046969d0c8dc92c2
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:29:15 2021 +0900

        zero padding working

        This reverts commit 58c3413a30.

    commit ce7848ba7def5a22659b09de039b2df12c0114f9
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:12:47 2021 +0900

        pylint, do not use -1 for default value

    commit 968f3bd230ed4855b45fd739dfc86edc2335ec80
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 13:07:31 2021 +0900

        rename to index_rank and make it Optional

    commit 9e06b8491e0ce1c981a5059f28135319f96978d0
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 18:01:59 2021 +0900

        fix pylint

    commit 81dc6050dcbe59915a8f9b4f78b4aaf9fdba89a6
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:57:03 2021 +0900

        minor fix

    commit 54297b6128863d07e7dded71cc40077726faf2db
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:54:16 2021 +0900

        support dynamic scatter nd

    commit e25c225ce747c4e84452e6e7b32eeb0d71b2995d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:33:19 2021 +0900

        gather_dim -> num_indices_per_tuple

    commit aaa6211e7ef3ce520b8711a78cf7eb2af52e7acc
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:23:46 2021 +0900

        add dynamic gather_nd test

    commit 3a9fe5dfa5faeadbcdb882ff70039ea7bccb61a3
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 17:18:26 2021 +0900

        refactor gather_nd ref funcs

    commit 1ff4d53f057e7bfd1c6dff31a81f866727bef855
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 21 14:36:34 2021 +0900

        add gather_nd shape func

    commit b0200643a184294a2f2b3cce7208c4d257987424
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 04:01:11 2021 +0900

        working on zero padding

    commit 456741790dd5e73f3f76ef7a5ede6e1014de8b2d
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 03:21:52 2021 +0900

        working

    commit 7f5c76d0090950985888781f071ca341e2fa5695
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Sat May 29 02:37:50 2021 +0900

        relay type inference works, debugging topi

    commit 4a4b8dfbfdc65d7a6e77ed0a6e8b09af162b77ad
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 15:08:16 2021 +0900

        add max_total_size to attributes

    commit 7218b2f7b4de0c796d69f23084cd688e28f7b461
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:50:58 2021 +0900

        tf frontend update

    commit cde4a1fdd15ed898b1f7299e99377cceaaee2732
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 14:17:14 2021 +0900

        all class nms tf mode first cut

    commit 5f349f77c9c230ee636aceb52547502319c8ad77
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Fri May 28 06:54:34 2021 +0900

        begin supporting per batch output

    commit 0044365affac6667a02d15791a59040702f8990b
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Mon May 3 19:46:28 2021 +0000

        initial

    commit 168a617e48b062417b766d6400b0c6b856084cfa
    Author: Trevor Morris <trevmorr@amazon.com>
    Date:   Fri Apr 16 20:31:32 2021 +0000

        initia;
        l

commit 06ac2052ab843be950ff3abf6ce8d52803adc5e5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:12:47 2021 +0900

    pylint, do not use -1 for default value

commit 2adc42618580c967bd49d53c0724382f9cf87772
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 28 13:07:31 2021 +0900

    rename to index_rank and make it Optional

commit c458da6e80b0ff7b6e2ca729a49755f42dfe3702
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 18:01:59 2021 +0900

    fix pylint

commit b7faf0f93bd3ba4fc0eb88f1fac31c8d9525c883
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:57:03 2021 +0900

    minor fix

commit c03164116046670963f1d04529bfe94c5030ad17
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:54:16 2021 +0900

    support dynamic scatter nd

commit 56f3f0ea3fae4ba049101fcb4571b8999a3bda1c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:33:19 2021 +0900

    gather_dim -> num_indices_per_tuple

commit 081823b0129093602bb7f512f326eeb10bfb1906
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:23:46 2021 +0900

    add dynamic gather_nd test

commit 6b2655baf867b4d08e7d21ffe5f854228ced57e9
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:18:26 2021 +0900

    refactor gather_nd ref funcs

commit f9f5dfbe2a65eff8aa6718bf05fd8a843c5df08f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 14:36:34 2021 +0900

    add gather_nd shape func

* make combined nms converter public

* do topk on smaller score tensor

* update tests

* remove max_total_size attribute, do minimum in relay side

* fix topk

* update relay doc

* update doc

* fix pylint

* update shape func for tf mode and add test

* name change

* reject dynamic inputs

* revert gather_nd change

* do not try to support dynamic batch size in tile rep

* check batch_size is int

* fix dtype issue in scan

* fix slicing before topk
2021-06-04 16:28:05 -07:00
Mehrdad Hessar a1cd6d51b8 fix py files (#8194) 2021-06-04 23:22:46 +01:00
Christopher Sidebottom a769ece4a5 [AOT] Initial implementation of --unpacked-api (#8023)
* [AOT] Initial implementation of --no-typed-operators

Based on the discussions in the AOT embedded improvements RFC, this adds a flag to the target which changes the internal operators to an unpacked API. The unpacked API spreads the input buffers across the operator function, for example:

int32_t operator(void* arg0, void* arg1);

As opposed to the traditional packed API:

int32_t operator(void** args);

Uneffected is the entrypoint function, which retains a packed API for
compatibility with other parts of TVM. This is done by changing the
passes taken by none entrypoint (CallingConv::kEntryPoint) functions.

* Move entrypoint generation outside of main passes

This removes the logic for deciding the entrypoint from the compiler
passes and instead moves it into the metadata code generation. By moving
the generation, we can generate a variety of entrypoints on top of the
compiler output (such as the micro entrypoint discussed in the RFC).

* Use buffers in make_unpacked_api tests

* Enable --no-typed-operators for llvm

* Change --no-typed-operators to --typed-operators=0 to match other options

* Refactor typed-operators lookup into use_typed_operators_

(Also contains minor clean up of output variables)

* Rename --typed-operators to --unpacked-api

(Also moves the entrypoint name to a constant)

* Move all properties into init list to avoid double init

* Remove AutoTVM breaking default and improve clarity
2021-06-04 13:54:04 -07:00
yuheng huang 82cf1973b0 Fix prelu bug in pytorch frontend (#8192)
* Fix prelu bug in pytorch frontend

* Fix lint error

* fix lint error

* Fix lint error

* Try to fix lint error

* Fix lint error

Co-authored-by: huangyuheng <32429436+hyhzxhy@users.noreply.github.com>
2021-06-05 05:10:19 +09:00
Lunderberg a74d0fef35 [Codegen] Use "target.build.$TARGET_KIND" for all codegen functions. (#8071)
* [Codegen] Use "target.build.$TARGET_KIND" for all codegen functions.

- Removed special case for "micro_dev" target.  Instead, register
  BuildCHost as both "target.build.c" and "target.build.micro_dev".

- Renamed "target.build.build.aocl_sw_emu" to
  "target.build.aocl_sw_emu".  Appears to be a typo introduced in
  #841725cc585

* [micro_dev] Removed references to non-existent micro_dev

device_api.micro_dev was removed in
745e542e4d, but several references still
remained.

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
2021-06-04 10:34:25 -07:00
xqdan 0429c63215 Complete register op from python (#8079)
* Complete register op from python

* fix lint

* fix lint

* fix lint

* fix comments

* fix

* fix

* fix comments

* fix lint

* fix lint

* add comments

* fix build

* fix

* add exception case

* fix

* fix comments

* fix

* fix

* fix

* fix

* fix

* fix

* fix

Co-authored-by: xiaoqiang.dan <xiaoqiang.dan@streamcoputing.com>
2021-06-04 20:48:52 +08:00
CircleSpin c7f1b45b89 Onnx eyelike (#8191)
* add ONNX EyeLike converter

* need to implement k

* test pass

* eyelike tests all pass

* Revert "test pass"

This reverts commit 0aa7347aaf27493d53492c9f0be305bf8358760b.

* removed comments, black'd, lint

* changed == to is in onnx.py

Co-authored-by: Masahiro Masuda <masahi129@gmail.com>
Co-authored-by: Jocelyn <jocelyn@pop-os.localdomain>
2021-06-04 16:10:06 +09:00
Junru Shao dd09bbb31f [TensorIR][M2a] ComputeInline,ReverseComputeInline (#8170)
This PR is part of the TensorIR upstreaming effort (#7527), which adds the first 2 schedule primitives:

- compute-Inline
- reverse-compute-inline

Co-authored-by: Siyuan Feng <Hzfengsy@sjtu.edu.cn>
Co-authored-by: Bohan Hou <32121147+spectrometerHBH@users.noreply.github.com>
Co-authored-by: Ruihang Lai <lairuihangdongdong@qq.com>
Co-authored-by: Hongyi Jin <3231950289@qq.com>
Co-authored-by: Wuwei Lin <wuwei@apache.org>
Co-authored-by: Cody Yu <comaniac0422@gmail.com>
2021-06-03 19:50:05 -07:00
Mehrdad Hessar b75377244c fix UTF (#8185) 2021-06-03 15:50:41 -07:00
Leandro Nunes 155f669849 [TVMC] Fix tvmc compile to extract target and target_host from --target (#8176)
* [TVMC] Fix tvmc compile to extract target and target_host from --target

 * Removes validation to accept up to two TVM targets and
   set them as target and target_host

* Update python/tvm/driver/tvmc/common.py

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

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
2021-06-03 09:20:59 -07:00
masahi cbe3dcad5e [Relay, TOPI] Refactor strided_slice and add axes argument (#8165)
* Initial import

commit 667011f10320918e4dcd47ac2b57fe49849e5440
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 27 16:28:57 2021 +0900

    Squashed commit of the following:

    commit 95242d86ea5de96925430c0a74b6e91e299fb5ab
    Author: Masahiro Masuda <masahi129@gmail.com>
    Date:   Thu May 27 15:45:19 2021 +0900

        Add function attribute for shape func for profiling

commit b8ede24ff987eb152bde7cc15afce004a88aeb5f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 27 10:21:06 2021 +0900

    layout transform support complete

commit 5782b7070288eb0de122f5dab91b38c26166a7d7
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Thu May 27 08:31:11 2021 +0900

    support layout transform part1

commit e94aa6b2a916607234c89eddcd07afdfa8085786
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 19:47:46 2021 +0900

    moved utilities to its own file

commit 8bf88913b9bc02730120a0695138ed3fb8ed49ae
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 17:39:50 2021 +0900

    fix format

commit e89d599d6a10021167feb241483693260aa535f2
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 17:33:02 2021 +0900

    ToVec -> ConvertToVec

commit 001982ce1419504f1f0e1d116d57dd34f0180008
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 17:26:56 2021 +0900

    format

commit fae57f9bd67b29880a7552b5149d03120924cdac
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 17:24:35 2021 +0900

    use Any for relay type rel path

commit 053eee2e6f58749af0b68cca52fd530afc0f6454
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 17:14:44 2021 +0900

    fix

commit fbb099c8e66caf846c773e180c66a2b336bd64a3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 16:39:37 2021 +0900

    refactor type rel

commit ecfe3cd43e3968375505d5393959ec19da4b5c01
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 16:23:47 2021 +0900

    working

commit b357c2f8825603d8ba9ee2424a7f572e12c29852
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 16:07:07 2021 +0900

    refactoring output shape calc

commit f69ef407cf003c7977a4564185949d3f6b5c0219
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 14:23:36 2021 +0900

    bug fix end param init

commit a5611c9a1f243f4b9a56539e7e8a15661374920c
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 13:42:31 2021 +0900

    fix test shape

commit e79931a264f0d8ed63a333ec4ab10a72cff22a84
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 13:42:03 2021 +0900

    dyn slice tests left as todo now work

commit 7db4cea31378eed85dfae1cb03fb5a97394f7fe3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 13:36:30 2021 +0900

    remove dynamic input specific op

commit 510bce6a181604e5eb3f2bd1951ae035a4090700
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 12:52:30 2021 +0900

    refactoring dynamic slice

commit 1b3969ade9ee98651b8157ecab1c675410a84ee5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 09:06:46 2021 +0900

    fix slice axes dispatch

commit 9a795606fb71ec08cefe5bfa904f1ab32c18da4b
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 08:32:54 2021 +0900

    refactor compute

commit 80442f86bbf9f0582823d5903021e3bae61a4662
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 08:11:18 2021 +0900

    fixed output shape, refactored version working

commit d2538ae980a1c731b646467c615d742efeb65e25
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 07:56:05 2021 +0900

    restore another slice variant

commit 36aa777eacd8426a850d08b528e9addcd36a4894
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Mon May 24 06:41:50 2021 +0900

    refactoring slice with axes

commit 32698b74df211829777e5493e82bf7425364acb4
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 22 13:11:01 2021 +0900

    fix axes null check

commit 54fb723d23d351551b75d879198aafb1eac2dede
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 22 12:52:18 2021 +0900

    Revert "[Bugfix][Vulkan] Call VulkanDeviceAPI destructor on program exit (#7997)"

    This reverts commit 58c3413a30.

commit 37eaf579d47190bc42ad64f9ac34c93a9dac3ce5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 22 04:30:37 2021 +0900

    remove wip layout transform support for slice with axes

commit 9bcb2ada60fadadd1f29a6d09e6b4fc5104efd3f
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 18:01:59 2021 +0900

    fix pylint

commit 7063a09ef1b98849e98194e8a9e47455cd1b5fa3
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:57:03 2021 +0900

    minor fix

commit 96c9231b5b2cbf2f36b4096d54f1f5ac4033d361
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:54:16 2021 +0900

    support dynamic scatter nd

commit d4a4db8a8b518b1ef9e6abacfa23a9e1b76fd1b0
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:33:19 2021 +0900

    gather_dim -> num_indices_per_tuple

commit a489375f0b31948a13e41f5967960305453c7049
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:23:46 2021 +0900

    add dynamic gather_nd test

commit 533854a006c16359842451b8690cb8639b47635d
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 17:18:26 2021 +0900

    refactor gather_nd ref funcs

commit 36a4501a151070760559f6ce4cfa574202b4d0c8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 14:36:34 2021 +0900

    add gather_nd shape func

commit 1853c35d883e501e484d5f74adb3081f916761d5
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Sat May 22 04:20:39 2021 +0900

    add eyelike support

commit 150e945290cbc595bd370dcae7e96e24597fbf04
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 04:08:37 2021 +0900

    migrating inlined topi compute to topi/transform.h

commit 763ac37f725c2cb89a3221621b69da0e6ac39ed8
Author: Masahiro Masuda <masahi129@gmail.com>
Date:   Fri May 21 03:45:37 2021 +0900

    strided slice with axes support

* fix bad merge

* fix cpplint

* fix pylint

* more cpplint fix

* fix compiler warning

* add doc

* add tests

* typo fixed

* support axes argument in topi cpp strided slice

* Properly test axes argument in relay tests

* fix bad merge (revert vm change)

* fix tests
2021-06-03 06:33:00 +09:00
Wang Yucheng b7c98b83ea [Strategy] Add group_conv2d_nchw_int8 in cuda strategy (#8167)
* add group_nchw_int8.cuda

* fix

* fix style

* fix style

* fix style

* fix style

* fix style

* fix style

Co-authored-by: wangyucheng <wangyucheng@sensetime.com>
2021-06-02 14:00:23 -04:00
Lily Orth-Smith 6baccc1305 [ONNX] [Relay] Update unique operator to match ONNX output (1D only) (#8099)
* Fix topi test case and docs (tvm was returning inverse_indices and claiming it was indices)

* Passes on CPU, fix unique op test

* more changes

* mtrying to fix optional outputs in onnx importer

* TupleGetItem is being passed a stringgit add python/tvm/relay/frontend/onnx.py debugging print statements

* Unique is passing onnx unit tests

* fix indices

* change comment

* fix return of compute unique

* black

* fix lint

* Some stray .asnumpy()s got through my merge, fix)

* fix lint

* revert changed .numpys

* missed a few

* fix more .asnumpy

* fix black

* Fix op level 3 test

* remove prints

* Fix pytorch and tf importers

* black

* fix lint

* fix indentation

* fix topi test
2021-06-01 11:31:55 -06:00
Chenfan eebd5a94e8 [FastMath] Add cuda & x86 schedules for fast_softmax (#8150)
* Add cuda & x86 schedules for fast_softmax

* Bug fix

* Re-trigger CI
2021-05-31 16:22:33 +08:00
Wang Yucheng 4bbbfe894e [Fix] Fix conv2d HWNC type strategy (#8147)
* fix conv2d strategy

* fix style

* fix style

Co-authored-by: wangyucheng <wangyucheng@sensetime.com>
2021-05-30 09:38:04 -04:00
Lunderberg e535ec8a3b [VM] Avoid round-trip Target->str->Target conversions (#8161)
Currently, in some cases this round-trip cannot be completed.  For
example, if an Integer value has a value outside a 32-bit signed
integer range, or if a String value contains spaces.

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
2021-05-30 12:08:24 +09:00
Andrey Malyshev 8b5d843e75 Fix tvmc tuner for cases when uTVM is not enabled (#8153) 2021-05-30 12:07:42 +09:00
Josh Fromm e26990fa49 [AutoTVM][AutoScheduler] Add workaround to alter op layout bug in task extraction. (#8143)
* Add workaround to alter op layout bug in task extraction.

* Only copy mod.
2021-05-30 12:07:04 +09:00
masahi 27e44eee21 [Relay] Support dynamic indices size in gather_nd and scatter_nd (#8105)
* add gather_nd shape func

* refactor gather_nd ref funcs

* add dynamic gather_nd test

* gather_dim -> num_indices_per_tuple

* support dynamic scatter nd

* minor fix

* fix pylint

* rename to index_rank and make it Optional

* pylint, do not use -1 for default value
2021-05-30 12:06:22 +09:00
zackcquic ece644c5ed [IR][Pass][Instrument] Pass instrument framework (#7952)
* [IR][Pass][Instrument] Pass instrument framework

This commit provides utilies to instrument passes:
  1. Add a new namespace tvm.instrument
  2. Introduce PassInstrument and PassInstrumentor to PassContext

     Example
     -------
    passes_mem = #... Impl of memory instrument
    passes_time = tvm.instrument.PassesTimeInstrument()

    with tvm.transform.PassContext(
        pass_instrumentor=PassInstrumentor([passes_mem, passes_time])):

        tvm.relay.build(mod, 'llvm')

        passes_mem.rendor()
        passes_time.rendor()

  3. Integrate existing PassContext::Trace() and timing profile

* [IR][Pass][Instrument] Fix python test_pass_manager.py

* Fix comment

* Fix lint

* Fix test_pass_annotation

* Fix test_pass_annotation.py

* Fix lint

* Fix test_pass_annotation.py

* Fix test_pass_annotation.py

* Fix review comments

* Fix tutorial use_pass_infra.py

* Fix review comments

* Fix review comments

* Fix typo

* Fix review comments

* Fix review comments

* Fix unittest error: test_cow_pass

* Fix unittest error

* Add more test cases for exceptions

* Fix nit

* Doc override_instruments()

* Fix review comments

* Fix lint

* Fix EnterContext exception behavior
2021-05-28 13:44:09 -04:00
Nicola Lancellotti f0aedc4bcb Pin black version (#8139)
This commit pins the black version to provide stability.
It is expected that the pinned version will be moved forward periodically.

Change-Id: Ied866bff85a1a832959bc1d4673a7fdec68128a7
2021-05-28 10:16:46 -07:00
Mehrdad Hessar dad59be176 [microTVM] AOT Demo (#8075)
* initial

* remove compare

* temp fix

* debugging

* hack

* hack for testing

* both test pass

* cleanup

* fix tests and tutorials

* restructure

* cleanup

* cleanup

* fix check files

* fixed for physical devices

* address comments

* reduce nrf stack size

* update sample url

* format
2021-05-28 10:13:17 -07:00
Elen Kalda 23a95f6adc [lint] Fix black whitespace errors (#8124)
Change-Id: I927b43df95a8db8b042bc3cf2a1f23739d102b9d
2021-05-27 06:13:09 +09:00
Chenfan 4344540ad4 [FastMath] Add fast_softmax support in fast_math pass (#8138)
* Add fast_softmax support in fast_math pass

* Lintfix

* Update
2021-05-26 09:29:15 -07:00
Lunderberg c02cafb657 [Vulkan] Add device capabilities to Target, use in codegen (#8127)
* [Vulkan] Enable instance/device extensions

- Vulkan requires that extensions be explicitly enabled if used.
  Explicitly list out which extensions are required (currently none)
  and which are optional.

* [Vulkan] Extract device information from vulkan API.

- Based on vkGetPhysicalDeviceProperties and
  vkGetPhysicalDeviceFeatures, determine which Vulkan capabilities are
  supported, pack into a Target.

* [Vulkan] Query instance-supported apiVersion before creating instance

- Previously, vkCreateInstance was called to initialize Vulkan 1.0.

* [Vulkan] Moved options for dedicated allocation and push descriptors to environment variables

- Query support for dedicated allocation and push descriptors along
  with the rest of the device support.  Move the options to disable
  their use from compile-time variables to environment variables
  `TVM_VULKAN_DISABLE_PUSH_DESCRIPTOR` and
  `TVM_VULKAN_DISABLE_DEDICATED_ALLOCATION`.

* [Vulkan] Move option for vulkan validation layers to environment variable

- Moved to enable faster use as a debug tool.  If
  `TVM_VULKAN_ENABLE_VALIDATION_LAYERS` is a non-empty string,
  validation layers will be enabled.

* [Vulkan] Explicitly enable vulkan features in device creation

- Vulkan requires that features be explicitly enabled before use.  For
  each feature that the device supports and a shader might use,
  declare it in the call to `vkCreateDevice`.

* [Vulkan] Avoid repeated queries for device attributes.

- Implement `VulkanDeviceAPI::GetAttr` based on the per-device values
  stored in the Target.  This pulls all logic for querying device
  parameters is in a single location.

* [Vulkan] Implement "from_device" flag for the vulkan target.

- With the number of device capabilities that may or may not be
  supported by a vulkan driver, it can be tedious to input them.
  Specifying "-from_device=0" now indicate that any unspecified values
  should be read from the device.

* [Vulkan][Codegen] Read vulkan device capabilities/limits from Target

- Previously, the codegen assumed that all device features were
  present.  Now, the codegen reads device capabilities from the
  Target, and throws an error if codegen would require use of an
  unsupported feature.

Co-authored-by: Eric Lunderberg <elunderberg@octoml.ai>
2021-05-26 23:50:24 +09:00