platform/upstream/tvm.git
4 years ago[ONNX] Add Clip importer to handle when min/max are provided as inputs. (#6251)
Chris Sullivan [Mon, 7 Sep 2020 19:20:25 +0000 (12:20 -0700)]
[ONNX] Add Clip importer to handle when min/max are provided as inputs. (#6251)

* [ONNX] Add Clip importer to handle when min/max are
provided as inputs.

* Use relay.op.minimum/maximum to handle dynamic bounds for Clip.

* Update test to new testing standard

4 years agoreshape with non constant shape argument (#6411)
masahi [Mon, 7 Sep 2020 15:02:30 +0000 (00:02 +0900)]
reshape with non constant shape argument (#6411)

4 years agoiadd conv2d_transpose alter layout (#6358)
Beya2019 [Mon, 7 Sep 2020 03:40:42 +0000 (11:40 +0800)]
iadd conv2d_transpose alter layout (#6358)

Co-authored-by: honghua.cao <honghua.cao@streamcomputing.com>
4 years ago[Fix] fix compilation error when setting USE_RELAY_DEBUG (#6380)
Tianming Xu [Sun, 6 Sep 2020 16:05:27 +0000 (00:05 +0800)]
[Fix] fix compilation error when setting USE_RELAY_DEBUG (#6380)

* fix compilation error when setting USE_RELAY_DEBUG

* awake github ci-test

* remove unnecessary debug log

4 years ago[TARGET] Add layout_transform, clip and expand_dims in onnx converter (#6366)
Xingyu Zhou [Sat, 5 Sep 2020 22:06:35 +0000 (15:06 -0700)]
[TARGET] Add layout_transform, clip and expand_dims in onnx converter (#6366)

* Add layout_transform, clip and expand_dims in onnx converter

* remove _add_input and address comments

* address comments

4 years ago[VTA][Xilinx] Update to Vivado 2020.1 and Pynq 2.5 (#6402)
Thierry Moreau [Sat, 5 Sep 2020 10:54:59 +0000 (03:54 -0700)]
[VTA][Xilinx] Update to Vivado 2020.1 and Pynq 2.5 (#6402)

* vivado version update

* update docs

4 years agoAdd safe up/downcasting to the Rust object system (#6384)
Max Willsey [Fri, 4 Sep 2020 23:29:49 +0000 (16:29 -0700)]
Add safe up/downcasting to the Rust object system (#6384)

* Revamp the rust object system with safe subtyping

* Small nits

4 years agoRemove unintentional pytest dependency. Fix #6398 (#6399)
Leandro Nunes [Fri, 4 Sep 2020 22:02:51 +0000 (23:02 +0100)]
Remove unintentional pytest dependency. Fix #6398 (#6399)

4 years ago[Relay/topi] Support scalar inputs in where op (#6383)
masahi [Fri, 4 Sep 2020 21:51:01 +0000 (06:51 +0900)]
[Relay/topi] Support scalar inputs in where op (#6383)

* support where with scalars

* add test for where with scalar

* add comment

4 years ago[RELAY][DYN] Dynamic UpSampling3D Op (#6353)
Lily Orth-Smith [Fri, 4 Sep 2020 15:48:54 +0000 (08:48 -0700)]
[RELAY][DYN] Dynamic UpSampling3D Op (#6353)

* frontend and start of cpp impl

* upsampling3d typerel and makefunc

* impl upsampling3d dynamic to static pass

* passes test_dyn_upsampling3d_infer_type_const

* fix bugs and improve doc for resize and upsampling

* code cleanup

* make tests more complex

* code cleanup, fix test_dyn_upsampling3d_run

* fix typo

* ci not working

4 years ago[METAL] Use CFBridgeRetain for retaining the allocated resource (#6393)
Tianqi Chen [Fri, 4 Sep 2020 01:03:36 +0000 (18:03 -0700)]
[METAL] Use CFBridgeRetain for retaining the allocated resource (#6393)

4 years ago[CI][Contrib] Add Vitis-AI docker installation (#6342)
anilmartha [Thu, 3 Sep 2020 17:45:05 +0000 (23:15 +0530)]
[CI][Contrib] Add Vitis-AI docker installation (#6342)

* [CI][Contrib] Add Vitis-AI docker installation

* rename ubuntu_install_vai_packages.sh to ubuntu_install_vitis_ai_packages_ci.sh

* Add Dockerfile.demo_vitis_ai and environment scripts

* Add comment to docker/bash describing Xilinx Vitis-AI specific setup

Co-authored-by: anilm (generated by with_the_same_user script) <anilm@xhdabidk40.xilinx.com>
Co-authored-by: Anil Martha <anil.martha@xilinx.com>
Co-authored-by: Jorn Tuyls <jornt@xilinx.com>
4 years ago[Relay] Fix Type Arguments not Attached (#6385)
Andrew Liu [Thu, 3 Sep 2020 17:31:19 +0000 (10:31 -0700)]
[Relay] Fix Type Arguments not Attached (#6385)

4 years ago[Bugfix][Printer] Avoid adding annotation twice for ConstantNode (#6364)
Yizhi Liu [Thu, 3 Sep 2020 16:57:13 +0000 (09:57 -0700)]
[Bugfix][Printer] Avoid adding annotation twice for ConstantNode (#6364)

* [Relay] Add user-defined constant node printer

* fix constant node printer, which appends annotator twice when meta=true

* fix lint

4 years ago[RELAY][VM] Enable heterogeneous execution for Relay VM (#6337)
Zhi [Thu, 3 Sep 2020 16:47:03 +0000 (09:47 -0700)]
[RELAY][VM] Enable heterogeneous execution for Relay VM (#6337)

* vm heterogeneous execution

* context analysis on module

* fix profiler

* fix memory plan

* add more unification

* add serialization

* add gpu tests for test_adt

* cache visited functions

* path compression

* C++ context analysis

* remove python context analysis

* add tests

* clean

* lint

* fix

* enable gpu test for dynamic namespace

* remove GetParamsContext

* fix comments and add doc for context analysis

* cache context

* cache allocator

* rebase and fix comments

4 years ago[DOCS] Fix the docker binary cache location (#6390)
Tianqi Chen [Thu, 3 Sep 2020 16:39:08 +0000 (09:39 -0700)]
[DOCS] Fix the docker binary cache location (#6390)

4 years ago[TFLite] Support for 'SAME' Padding option for TRANSPOSE_CONV operator of TFLite...
Rishabh Jain [Thu, 3 Sep 2020 16:37:22 +0000 (22:07 +0530)]
[TFLite] Support for 'SAME' Padding option for TRANSPOSE_CONV operator of TFLite. (#6381)

* [TFLite] Support for 'SAME' Padding option for TRANSPOSE_CONV operator of TFLite.

* Added support for 'SAME' Padding option for TRANSPOSE_CONV operator for all
  valid kernel sizes.
* Added tests for 'SAME' Padding option for TRANSPOSE_CONV operator.

* Minor Changes.

4 years ago[Frontend][TensorFlow] Improve TensorFlow control flow nodes ordering (#6387)
Yao Wang [Thu, 3 Sep 2020 16:25:14 +0000 (09:25 -0700)]
[Frontend][TensorFlow] Improve TensorFlow control flow nodes ordering (#6387)

* Improve TensorFlow control flow nodes ordering

* Fix Lint

4 years agoMake docs build again when not everything is enabled (#6386)
Andrew Reusch [Thu, 3 Sep 2020 01:43:49 +0000 (18:43 -0700)]
Make docs build again when not everything is enabled (#6386)

4 years ago[TESTS] Refactor tests to run on either the GPU or CPU. (#6331)
Tristan Konolige [Wed, 2 Sep 2020 21:50:59 +0000 (14:50 -0700)]
[TESTS] Refactor tests to run on either the GPU or CPU. (#6331)

Much of the time spent in testing is duplicated work between CPU and GPU
test nodes. The main reason is that there is no way to control which
TVM devices are enabled at runtime, so tests that use LLVM will run on
both GPU and CPU nodes.

This patch adds an environment variable, TVM_TEST_DEVICES, which
controls which TVM devices should be used by tests. Devices not in
TVM_TEST_DEVICES can still be used, so tests must be careful to check
that the desired device is enabled with `tvm.testing.device_enabled` or
by enumerating all devices with `tvm.testing.enabled_devices`. All
tests have been retrofitted with these checks.

This patch also provides the decorator `@tvm.testing.gpu` to mark a test
as possibly using the gpu. Tests that require the gpu can use
`@tvm.testing.requires_gpu`. Tests without these flags will not be run
on GPU nodes.

4 years ago[RELAY] Fix the FoldConstant Regression for VTA (#6377)
Tianqi Chen [Wed, 2 Sep 2020 19:17:14 +0000 (12:17 -0700)]
[RELAY] Fix the FoldConstant Regression for VTA (#6377)

* [RELAY] Fix the FoldConstant Regression for VTA

* [CI] Fix error guard that was missed in VTA.

This PR fixes an error guard during the documentation build step.

- Temporary disables VTA frontend tutorial due to
  the regression of deploy_detection

4 years ago[RUNTIME][CRT] use macro to replace hardcode number (#6365)
windclarion [Wed, 2 Sep 2020 17:19:57 +0000 (01:19 +0800)]
[RUNTIME][CRT] use macro to replace hardcode number (#6365)

Signed-off-by: windclarion <windclarion@gmail.com>
4 years ago[Torch] Support logsumexp, clean up unnecessary infer_shape usage (#6374)
masahi [Wed, 2 Sep 2020 15:55:38 +0000 (00:55 +0900)]
[Torch] Support logsumexp, clean up unnecessary infer_shape usage (#6374)

* clean up infer_shape usage, add logsumexp op

* add more tests for logsumexp

* remove commented code

4 years agoacquire gil while finalizing PackedFunc (#6378)
Andrew Reusch [Wed, 2 Sep 2020 14:35:01 +0000 (07:35 -0700)]
acquire gil while finalizing PackedFunc (#6378)

4 years ago[Relay] Enhance relay.split(), allow splitted dim to be dynamic (#6289)
lixiaoquan [Wed, 2 Sep 2020 06:04:37 +0000 (14:04 +0800)]
[Relay] Enhance relay.split(), allow splitted dim to be dynamic (#6289)

* [Relay] Enhance relay.split(), allow splitted dim to be dynamic

* Add assert in shape function

* Fix CI

4 years agoadd missing dependency (#6375)
Haichen Shen [Wed, 2 Sep 2020 04:46:19 +0000 (21:46 -0700)]
add missing dependency (#6375)

4 years ago[Relay] support i64 indices (#6143)
Haozheng Fan [Tue, 1 Sep 2020 23:40:00 +0000 (07:40 +0800)]
[Relay] support i64 indices (#6143)

4 years ago[BYOC][JSON] Support input nodes with multiple entries (#6368)
Trevor Morris [Tue, 1 Sep 2020 18:06:16 +0000 (11:06 -0700)]
[BYOC][JSON] Support input nodes with multiple entries (#6368)

* Support input nodes with multiple data entries

* Rename input_var_idx_ to input_var_eid_

4 years ago[Torch] Fix aten::max and aten::min conversion (#6372)
masahi [Tue, 1 Sep 2020 13:40:42 +0000 (22:40 +0900)]
[Torch] Fix aten::max and aten::min conversion (#6372)

* fix aten::max and aten::min conversion

* remove print

4 years ago[TIR][Transform]Block scope hoisting added (#6238)
ANSHUMAN TRIPATHY [Mon, 31 Aug 2020 21:19:33 +0000 (02:49 +0530)]
[TIR][Transform]Block scope hoisting added (#6238)

* Block scope hoisting added

* lowering flow added with 2 variants

* Fake commit to trigger ci with pass default enabled

* CI Failure resolved

* Optimize for if var list iteration

* More test case added

* Fake commit to disable failed test cases

* Pass default value restored

* [1] Review comment handled

* [2] Review comments handled

4 years ago[DOCKER] Fix Dockerfile.demo_android (#6361)
tkat0 [Mon, 31 Aug 2020 15:10:14 +0000 (00:10 +0900)]
[DOCKER] Fix Dockerfile.demo_android (#6361)

* [DOCKER] Fix Dockerfile.demo_android

* fix

4 years ago[Ansor][AutoTVM v2.0] Phase 2: Update heavy operations with parallel_for (#6348)
Chenfan [Mon, 31 Aug 2020 06:07:24 +0000 (14:07 +0800)]
[Ansor][AutoTVM v2.0] Phase 2: Update heavy operations with parallel_for (#6348)

* Update auto_scheduler with parallel_for

* Update

* Update

* Update

* Update inferbound

4 years ago[DOC] Fix mistyped word (#6362)
gigo [Mon, 31 Aug 2020 06:07:05 +0000 (14:07 +0800)]
[DOC] Fix mistyped word (#6362)

* Fix the doc mistyped word in `tvm.te.hybrid.build` function

Co-authored-by: gigo <gigo_liao@qbitsemi.com>
4 years ago[DOCKER] Use clear name that is separate from ASF brand for cache (#6360)
Tianqi Chen [Sat, 29 Aug 2020 21:34:50 +0000 (14:34 -0700)]
[DOCKER] Use clear name that is separate from ASF brand for cache (#6360)

4 years ago[Torch] Add cast to double, fix flatten conversion (#6357)
masahi [Sat, 29 Aug 2020 06:14:02 +0000 (15:14 +0900)]
[Torch] Add cast to double, fix flatten conversion (#6357)

* support cast to double and fix flatten conversion

* also support batch flatten, add test

* add flatten test

* clean up

4 years ago[Target][Codegen] Use target class in all codegens (#6347)
Junru Shao [Sat, 29 Aug 2020 05:59:35 +0000 (22:59 -0700)]
[Target][Codegen] Use target class in all codegens (#6347)

* [Target][Codegen] Make all code generator use Target class instead of target string

* Remove dep to TargetNode::str() in LLVM module

* Allow  for llvm nvptx codegen

* ...

* Address comments from Cody

* Rename UpdateTargetConfig => UpdateTargetConfigKeyValueEntry

4 years ago[CMAKE] Compatible for ROCm before 3.7 (#6359)
Tianqi Chen [Fri, 28 Aug 2020 21:42:15 +0000 (14:42 -0700)]
[CMAKE] Compatible for ROCm before 3.7 (#6359)

4 years agoImprove Rust bindings: Map, Array, String, various IR nodes (#6339)
Max Willsey [Fri, 28 Aug 2020 19:13:47 +0000 (12:13 -0700)]
Improve Rust bindings: Map, Array, String, various IR nodes (#6339)

* Fix datatype

* Add initialize macro

* Add some TIR nodes

* Better downcasting

* Improve Array and add Map

* Convert to new string API

* Clean up some warnings

* Add ConstIntBound type

* Run cargo fmt

* Remove debug prints

* Add some more ops

* Fix some string code

Co-authored-by: Jared Roesch <jroesch@octoml.ai>
4 years agoquanitze operation expanded to take const argument (#6127)
Dmitriy Smirnov [Fri, 28 Aug 2020 18:46:13 +0000 (19:46 +0100)]
quanitze operation expanded to take const argument (#6127)

* quanitze operation expanded to take const argument

* amendments

used get_tensor_expr, added _test_forward_quantize_dequantize_const test

4 years agoAdd docker/lint.sh, for running dockerized lint scripts locally (#6333)
Andrew Reusch [Fri, 28 Aug 2020 16:27:09 +0000 (09:27 -0700)]
Add docker/lint.sh, for running dockerized lint scripts locally (#6333)

* Add -i option to docker/bash.sh

 * Allows scripts to invoke dockerized commands interactively, for
   better Ctrl+C.

* Add docker/lint.sh to run lint step locally in the docker VM.

 * This allows developers to run lint using the official versions of
   the lint tools without needing to lookup the docker image name.
 * Move all lint scripts to tests/lint/
 * Point Makefile to those new scripts.
 * Update apache rat script to filter untracked/gitignore'd files when
   run with `docker/lint.sh`.

* fix bash_source[0]

* explicitly set the author for CI

* try environment variable override

* try config option

* remove =traditional from ignored option to increase git compat

* address comments, fix behavior under git worktrees

* address cppdocs comments

* address lint.sh comments

* address zhi comments, update pull_request rst

4 years agotypo (#6352)
Andrew Liu [Fri, 28 Aug 2020 04:27:38 +0000 (21:27 -0700)]
typo (#6352)

4 years ago[Ansor][AutoTVM v2.0] Phase 2: Evolutionary Search (#6310)
Cody Yu [Thu, 27 Aug 2020 22:11:42 +0000 (15:11 -0700)]
[Ansor][AutoTVM v2.0] Phase 2: Evolutionary Search (#6310)

* init commit

* Add rest rules

* refactor

* address comments

* improve test

* address comments

4 years ago[BYOC][ETHOSN] Add support for quantized convolution (#6335)
mbaret [Thu, 27 Aug 2020 21:03:45 +0000 (22:03 +0100)]
[BYOC][ETHOSN] Add support for quantized convolution (#6335)

* [BYOC][ETHOSN] Add support for quantized convolution

This PR adds support for quantized convolution. This
includes mapping it via a composite function and all
the necessary methods to convert from Relay to the
APIs in Support Library.

Co-authored-by: Leo Blonk <Leo.Blonk@arm.com>
Co-authored-by: Tristan O'Connor <tristan.oconnor@arm.com>
* Fix padding change

Change-Id: I0794b0ac6190478e2d1b858ad0dd90f37fc0207b

* Add docs to Tvm2Npu methods

Change-Id: Iab865619b449a3d0dd6bb0dbdcb198acd529fc4e

* Remove generate tests

Change-Id: I51f90499f7ce82a1ce49f0731d3d50627e1d0225

Co-authored-by: Leo Blonk <Leo.Blonk@arm.com>
Co-authored-by: Tristan O'Connor <tristan.oconnor@arm.com>
4 years ago[Relay][Training] Make AutoDiff thread through global function. (#6336)
雾雨魔理沙 [Thu, 27 Aug 2020 18:32:40 +0000 (11:32 -0700)]
[Relay][Training] Make AutoDiff thread through global function. (#6336)

* save

* lint

* lint

* fix warning

* fix test

* save

4 years ago[BYOC][ACL] Improved pooling support (#6248)
lhutton1 [Thu, 27 Aug 2020 03:50:38 +0000 (04:50 +0100)]
[BYOC][ACL] Improved pooling support (#6248)

* [BYOC][ACL] Improved pooling support

Adds support in ACL for the following relay pooling operators and composite functions:
  * nn.avg_pool2d (fp32), cast + nn.avg_pool2d(uint8) + cast => AVG pool
  * nn.global_max_pool2d => Global MAX pool
  * nn.global_avg_pool2d, cast + nn.global_avg_pool2d(uint8) + cast => Global AVG pool
  * power(2) + nn.avg_pool2d + sqrt => L2 pooling (for fp32 only)

Tests updated to reflect these changes.

Change-Id: I1644b67b60ebb252344eb9695a521d2d958c724e

* Address comments

Change-Id: Ibe8a61b4c42da246ce54701c89ea985b423c8f83

* Fix not checking output saturation

Change-Id: Ia6f3d9db31cfb8c417d8556d29961210fea418b2

* Use defined set of trials

Change-Id: Ib180e3a0cbb84d6fa00c7e1994f58cb62662db15

* Rebase master

Change-Id: I5c932751cd38da06d6f2b397be5d8ab7fdeb169f

4 years ago[Caffe Frontend] introduce caffe frontend for tvm (#6206)
FernChen [Thu, 27 Aug 2020 03:26:58 +0000 (11:26 +0800)]
[Caffe Frontend] introduce caffe frontend for tvm (#6206)

* [Caffe Frontend] introduce caffe frontend for tvm.

* [Caffe Frontend] fix bugs for generating caption in tutorial.

* [Caffe Frontend] delete statement for python2 and modify the function name.

* [Caffe Frontend] change the directory which will hold the tmp files
when testing the caffe frondend.

* [Caffe Frontend] delete tutorial about caffe frontend.

* [Caffe Frontend] delete some print statements

Co-authored-by: fernchen <zifeng.cf@alibaba-inc.com>
4 years ago[Relay/TOPI][TFLite] Implemented MATRIX_SET_DIAG Operator for Relay/TOPI and TFLite...
Rishabh Jain [Thu, 27 Aug 2020 03:21:45 +0000 (08:51 +0530)]
[Relay/TOPI][TFLite] Implemented MATRIX_SET_DIAG Operator for Relay/TOPI and TFLite Frontend. (#6303)

* Corrected docstring error.

* Minor changes.

* Changed MATRIX_SET_DIAG registration from broadcast to injective.

4 years ago[TESTS] add gpuonly tests for python unittests and integration (#6346)
Tristan Konolige [Thu, 27 Aug 2020 02:29:24 +0000 (19:29 -0700)]
[TESTS] add gpuonly tests for python unittests and integration (#6346)

4 years agoAdd `init` member to ReduceNode (#6138)
quic-sanirudh [Thu, 27 Aug 2020 02:11:24 +0000 (07:41 +0530)]
Add `init` member to ReduceNode (#6138)

- This patch adds a new member to ReduceNode called init which allows
  initialization with a custom ProducerLoad or a Float/Int immediate.
- This allows initialization of the output Tensor of a reduction with
  another Tensor instead of the `identity_element` defined in the
  CommReducer
- One example use case for this node is to initialize the Output of a
  convolution reduction with the Bias values thereby saving the
  Bias-add computation.

4 years agoROCm changed name of library and removed old one in ROCm 3.7 release. (#6345)
mvermeulen [Thu, 27 Aug 2020 01:55:31 +0000 (20:55 -0500)]
ROCm changed name of library and removed old one in ROCm 3.7 release. (#6345)

4 years ago[MSVC] Make able to compile with MSVC (#6341)
yukatayu [Wed, 26 Aug 2020 16:52:23 +0000 (01:52 +0900)]
[MSVC] Make able to compile with MSVC (#6341)

* fix: make suitable for msvc, clang

* clang-format

* refactor: use DMLC_ATTRIBUTE

4 years ago[DYN][RELAY] Resize support for NCHW-convertible layouts (#6293)
Lily Orth-Smith [Wed, 26 Aug 2020 08:21:05 +0000 (01:21 -0700)]
[DYN][RELAY] Resize support for NCHW-convertible layouts (#6293)

* fix lint

* fix typo

* remove channel_axis from resize shape func

* fix lint

4 years agoUse auto-tuner to improve conv2d_gemm performance (#6117)
Giuseppe Rossini [Wed, 26 Aug 2020 06:35:22 +0000 (07:35 +0100)]
Use auto-tuner to improve conv2d_gemm performance (#6117)

* Use auto-tuner to improve conv2d_gemm performance

The following tuning entities have been introduced:
- Unrolling and vectorizing input matrix transform
- Reordering gemm to exploit parallel threads
- Unrolling `gemm_quantized` intrinsic
- Interleaving `gemm_quantized` intrinsic

Change-Id: Icd3ab005663f78a80672e71ef368f6d0efa4a401

* Rebasing

Change-Id: Id27b6de705b16b93df8e885868961fa0321497be

* Fix python linting

Change-Id: I77d880424c3e7ce9de67c970ddb2cf2a92b52f79

* Fusing batch into inner dimensions before parallelizing

Change-Id: Ic58d1138ab96d58d12f5855f0e1044f10d9e6e9b

4 years agosave (#6338)
雾雨魔理沙 [Wed, 26 Aug 2020 03:37:22 +0000 (20:37 -0700)]
save (#6338)

4 years ago[Relay] Make check stricter by using Feature. Fixed multiple bugs. (#6326)
雾雨魔理沙 [Tue, 25 Aug 2020 18:40:34 +0000 (11:40 -0700)]
[Relay] Make check stricter by using Feature. Fixed multiple bugs. (#6326)

* save

lint

lint

lint

fix lint

lint

update

lint

save

save

save

lint

format

format

save

save

fix

use a form more suitable for numeric check

save

* save

* save

* lint

* save

* lint

* fix

* fix

4 years ago[FIX][VM] Fix relay vm optimize (#6322)
Zhi [Tue, 25 Aug 2020 16:07:02 +0000 (09:07 -0700)]
[FIX][VM] Fix relay vm optimize (#6322)

* [FIX][VM] Fix relay vm optimize

* retrigger ci

4 years ago[BYOC][ACL] Enable remote device via environment variables (#6279)
lhutton1 [Tue, 25 Aug 2020 16:04:20 +0000 (17:04 +0100)]
[BYOC][ACL] Enable remote device via environment variables (#6279)

* [BYOC][ACL] Enable remote device via environment variables

Improves the ACL remote testing infrastructure by allowing a remote device to be specified via environment variables. This means external scripts can be used to enable the runtime tests. By default an RPC server will not be used and the runtime tests will be skipped.

Change-Id: I8fc0b88106683ac6f1cbff44c8954726325cda21

* Use json file as configuration for tests

Change-Id: Iadce931d91056ed3a2d57a49f14af1ce771ae14b

* Do not load the test config during class creation

Change-Id: If718b5d163e399711111830f878db325db9c5f84

* Add check for existence of file

Change-Id: I2568bca7f4c3ad22ee8f9d065a9486ee3114f35c

4 years ago[Frontend][Relay] Keras softmax and prelu fix (#6278) (#6278)
Dongming Yang [Tue, 25 Aug 2020 00:08:41 +0000 (08:08 +0800)]
[Frontend][Relay] Keras softmax and prelu fix (#6278) (#6278)

* prelu and softmax with NHWC layout consideration

* fix lint

* fix lint

Co-authored-by: Dongming Yang <dongming.yang@streamcomputing.com>
4 years ago[OpFusion] Make the max number of fused ops configurable (#6327)
masahi [Mon, 24 Aug 2020 20:15:23 +0000 (05:15 +0900)]
[OpFusion] Make the max number of fused ops configurable (#6327)

4 years ago[Relay] Support for PyTorch Non-Maximum Suppression (#6314)
Yong Wu [Mon, 24 Aug 2020 13:19:57 +0000 (21:19 +0800)]
[Relay] Support for PyTorch Non-Maximum Suppression (#6314)

* [Relay] Support for PyTorch Non-Maximum Suppression

* fix comment

* add verify_model_vm

4 years ago[Ansor][AutoTVM v2.0] Phase 2: Basic GPU Sketch Search Policy (#6269)
Chenfan [Mon, 24 Aug 2020 10:46:31 +0000 (18:46 +0800)]
[Ansor][AutoTVM v2.0] Phase 2: Basic GPU Sketch Search Policy (#6269)

* Add PreloadMeasuredStates & Split search_policy.py

* Add GPU sketch rule

* Update

* Bug fix for log record

* Lint fix

* Update tutorial

* Update

* UT fix

* Remove tutorial

* Update

* Update

* Update UT

* Lint fix

* Update

* Update

4 years ago[RUNTIME][FFI] Fix cython FFI compact with np.int64 (#6321)
Tianqi Chen [Sat, 22 Aug 2020 15:30:48 +0000 (08:30 -0700)]
[RUNTIME][FFI] Fix cython FFI compact with np.int64 (#6321)

4 years ago[Relay] Make check stricter: disallow inserting function with free vars into module...
雾雨魔理沙 [Sat, 22 Aug 2020 05:11:50 +0000 (22:11 -0700)]
[Relay] Make check stricter: disallow inserting function with free vars into module. (#6313)

* save

lint

lint

fix test

fix test

* fix

4 years ago[Frontend][Pytorch]Add Pytorch advanced indexing (#6318)
Yao Wang [Sat, 22 Aug 2020 01:54:26 +0000 (18:54 -0700)]
[Frontend][Pytorch]Add Pytorch advanced indexing (#6318)

* Add Pytorch advanced indexing

* Minor fix for test

* Fix for cuda

4 years ago[BUG_FIX] Fix resize test (#6298)
Lily Orth-Smith [Sat, 22 Aug 2020 01:03:43 +0000 (18:03 -0700)]
[BUG_FIX] Fix resize test (#6298)

* fix resize tests

* add different scale to resize tests

* fix dynamic to static resize test

* fix error throwing in topi resize

* fix topi and importer tests

* fix lint

* flakey test failed

* make resize test less sensitive; had floating point rounding err on gpu

* remove nearest_neighbor + half_pixel option from pytorch importer

* remove nearest_neighbor + half_pixel in upsample3d

4 years ago[RELAY][MXNET][FRONTEND] add support for MXNET numpy operators (#6054)
sandyhu533 [Fri, 21 Aug 2020 20:47:47 +0000 (04:47 +0800)]
[RELAY][MXNET][FRONTEND] add support for MXNET numpy operators (#6054)

* [RELAY][MXNET][FRONTEND] add supports for OPs in numpy from mxnet

* Update test_forward.py

* Update mxnet.py

* Update mxnet.py

* Update test_forward.py

* update and bugfix

* test for multiple dtypes

* Update test_forward.py

* add data type and optimize coding style

* replace pytest.skip with @pytest.mark.skipif

* Update test_forward.py

* update pytest style

* Update test_forward.py

* Update test_forward.py

* Update test_forward.py

* Update test_forward.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-39-169.ap-northeast-1.compute.internal>
4 years ago[TIR] Enforce buffer pointer var type to be consistent with dtype. (#6317)
Tianqi Chen [Fri, 21 Aug 2020 17:53:39 +0000 (10:53 -0700)]
[TIR] Enforce buffer pointer var type to be consistent with dtype. (#6317)

Now that we have type_annotation in tir::Var.
We should make sure that the type annotation to be consistent with the dtype
in Buffer declaration and Allocation.

This change allows future passes to directly use the content type information via type_annotation.

This PR turns on the enforcement on Buffer and also fixed a few cases for Allocate.
A follow up PR need to fix a few more cases in the hybrid script parsing
before everything can be made consistent.

4 years agoRetrigger build. (#6304)
Rishabh Jain [Fri, 21 Aug 2020 17:32:42 +0000 (23:02 +0530)]
Retrigger build. (#6304)

4 years ago[RELAY][DYN] Dynamic upsampling relay op (#6273)
Lily Orth-Smith [Fri, 21 Aug 2020 16:06:53 +0000 (09:06 -0700)]
[RELAY][DYN] Dynamic upsampling relay op (#6273)

* implementing upsampling op

* fix lint

* fix lint again

* add doc to upsampling shape func

* fix set attrs build problem

* fixing imports

* reverting data layout transform changes

* moved layout template to header file

* changing python module from nn.dyn to dyn.nn

* adding support for more layouts to upsampling

* fix lint

* fix upsampling doc

* change _nn.py doc

* failed flakey test

* fix build after merge

4 years ago[TEST][FLAKY] fix random fail (#6312)
Zhao Wu [Fri, 21 Aug 2020 14:20:19 +0000 (22:20 +0800)]
[TEST][FLAKY] fix random fail (#6312)

* [TEST][FLAKY] fix random fail

* increase size and error check range

4 years ago[Target] Add python binding to new JSON target construction. (#6315)
Josh Fromm [Fri, 21 Aug 2020 14:04:56 +0000 (07:04 -0700)]
[Target] Add python binding to new JSON target construction. (#6315)

* Add python binding to new JSON target construction.

* Added json string parsing and new test.

* Add error type.

* Add error type in json decoding check.

* Fix sphinx formatting.

4 years ago[COREML]multiple output support, reshape, split ops added (#6296)
Siju Samuel [Fri, 21 Aug 2020 04:07:04 +0000 (09:37 +0530)]
[COREML]multiple output support, reshape, split ops added (#6296)

* [COREML]multiple output support, reshape, split ops added

* Review comments addressed

4 years ago[Torch] Fix dtype handling for modules with integer parameters (#6311)
masahi [Fri, 21 Aug 2020 02:29:45 +0000 (11:29 +0900)]
[Torch] Fix dtype handling for modules with integer parameters (#6311)

* return the correct type for GetAttr node

* keep _get_pytorch_value_type intact

* add test and handle quantized param

4 years agoChanged TVMCTVMContext to TVMContext (#6306)
Matthew LeMay [Fri, 21 Aug 2020 00:45:17 +0000 (20:45 -0400)]
Changed TVMCTVMContext to TVMContext (#6306)

4 years agoConstant input attr added to fully connected operation in TFLite frontend (#6228)
Dmitriy Smirnov [Thu, 20 Aug 2020 18:44:04 +0000 (19:44 +0100)]
Constant input attr added to fully connected operation in TFLite frontend (#6228)

* Constant input attr added to fully connected operation

An ability to handle constant input attr added to fully connected operation
Unit tests amended.

* renamed wrap_input to const_input

* removed extra spaces

4 years ago[RELAY][DYN] Implementation of the dynamic pad operator (#6284)
Lily Orth-Smith [Thu, 20 Aug 2020 01:57:05 +0000 (18:57 -0700)]
[RELAY][DYN] Implementation of the dynamic pad operator (#6284)

4 years ago[AutoScheduler] Fix flaky test (#6307)
Lianmin Zheng [Thu, 20 Aug 2020 01:38:10 +0000 (18:38 -0700)]
[AutoScheduler] Fix flaky test (#6307)

4 years ago[Relay] change device annotation from post DFS to recursive (#6124)
ZHANG Hao [Wed, 19 Aug 2020 16:49:00 +0000 (00:49 +0800)]
[Relay] change device annotation from post DFS to recursive (#6124)

* change device annotation from post DFS to recursive

* add testcast for recursive device propogation

4 years ago[BYOC][ETHOSN] Introduce the Ethos-N BYOC integration (#6222)
mbaret [Wed, 19 Aug 2020 16:39:33 +0000 (17:39 +0100)]
[BYOC][ETHOSN] Introduce the Ethos-N BYOC integration (#6222)

* [BYOC][ETHOSN] Introduce the Ethos-N BYOC integration

This is the first of 3 PRs to introduce the Ethos-N
integration into TVM via the BYOC framework. It adds
support for partitioning and compiling for the
Ethos-N77 target with CPU fallback for unsupported
operators. Additionally, runtime support is added in
the form of an Ethos-N runtime module. In this initial
PR, only quantized concatenate and split are supported
with follow-up PRs adding support for many further operators.

Co-authored-by: Leo Blonk <Leo.Blonk@arm.com>
Co-authored-by: Tristan O'Connor <tristan.oconnor@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
* Turn off USE_ETHOSN_HW by default

Change-Id: Ie2ce4528e16e93aa83df46f8a229c0ce89b45252

* Update capabilities file

Change-Id: Iebd0c62d6bc7e446662abdee4882ac874ad98aa3

* Fix missing header

Change-Id: I0c89e380dd1d795755a1884c06a7b317a99fe297

* Update cmake comments on ETHOSN_HW

Change-Id: I2e96a1c818a82e5174fd94e483b0bdb3e4375a7d

* Add checker for case when USE_ETHOSN=OFF and USE_ETHOSN_HW=ON

Change-Id: Id5c9cfb866914a0298b44ead40fcbe3764ce443c

* Fix 'available' boolean

Change-Id: I78e54fb9f472d2815886bea4d94b7247e0d129de

* Check availability in op registration

Change-Id: Iecfea7dca7301dd684199c9b32f99f2113fdfd56

* Remove unnecessary line

Change-Id: Idf5cab853027adb0b0292de877e6dc02683821d7

* Simplify getting output_size

Change-Id: If4643924768c2d7ea98525e9f792b7223cc2bcdf

* Remove unnecessary new line

Change-Id: Ia689c59cac28bd91e237ceecd829d8cf56d0d9c1

* Remove NOLINTS

Change-Id: I149b97b28b516c7d9288a0858b2fbf1497e70250

* Remove unused parts of PR

Change-Id: I2db5b89d8fe2c114ab92305cdcf06d0fc45f4d2a

* Fix CI Ethos-N settings

Change-Id: Idd955755d6f6d1cd3843462f627d0d952729e467

* Removed unnecessary line in infra

Change-Id: I0ea866adf5d9166db85dd82d013a631d991ae633

* Remove unnecessary len in infra

Change-Id: I869e8233d41c6ab7c2dc80f47d976c974043b80c

* Rename 'cpu_ops' to 'host_ops'

Change-Id: I79a6ffcfd48cd055d279f493c672ec82f0c68e5c

* Added explanation on mocking

Change-Id: I1e88c07a47464e44cb45c6a327ec9c7e2d70cc94

* IsEthosOp -> IsEthosnOp

Change-Id: I4fc1b462a74f8fae231ebafac614dd8d45be0feb

* Improve documentation in ethosn_api.h

Change-Id: I5586a7ba7ce71da667a6a9c6dd2e591028eb43b2

* No longer iterate over module when compiling

Change-Id: I80e1d494c6d574be06a2375e831343485712914d

* Move EthosnCompiler implementations into codegen.cc

Change-Id: I5bb6e9f62722d930d9dc040ac62bf87f29dd74c5

* Fix linting

Change-Id: Ia44ec741a5330ad289cc6b5cd2bb1ed784fe6afc

* Refactor EthosnAPI compilation functions into EthosnCompiler

Change-Id: Iee0aecbe43a84fefb437ab9ff064e3f8b42c80a4

* Improve docs for Tvm2Npu

Change-Id: Ia39e9e1508513ca39c1d585fbccc3ae38fcbb9fb

* Move more implementation out of headers

Change-Id: I1e33084ceb520b75f06b4d7a4acff5b9b2225bd5

* Move implementation in ethosn_api.h

Change-Id: I51ab386892a2aa84aa47d03641aac8468f5737ae

* Improve docs for capabilities.h

Change-Id: Iaaee508aafa1cbb7650a04ed87bd6c1b91823a58

* Use else() in cmake

Change-Id: I4b64a87f32b3616ec87c9937d9fc998b8dc5d7b4

* Use GetDataSize

Change-Id: I16988f3adbe6e03fc47fa0a77cb5febb7a02eaab

* Use const&

Change-Id: I664982d219f9a7d1f961dbfe84d12f66e2e5f5cb

* Fix python linting

Change-Id: Id965ccc037fd40cbdfcb58d922cc8d5fb8c87dfe

* Remove load/save to file

Change-Id: I7f8c3f5c8948c3f15551d28e3fee6e00120663ef

* data->data

Change-Id: Ifb861ebbfeaaf4b154f4b1515f83a46aecf86e50

* Remove specific cpu target

Change-Id: I920568cc7a81cd77d44f8604f571340a330f3e62

* Test export/load module

Change-Id: Ib605458127485e2015ac012ec515ced5900705f3

* Fix cmake garbage

Change-Id: I32f3c967192c7c278ef33c52cac5fb5da682cd1b

Co-authored-by: Leo Blonk <Leo.Blonk@arm.com>
Co-authored-by: Tristan O'Connor <tristan.oconnor@arm.com>
Co-authored-by: Leandro Nunes <leandro.nunes@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
4 years ago[Torch] Fix cast to long (#6301)
masahi [Wed, 19 Aug 2020 11:50:36 +0000 (20:50 +0900)]
[Torch] Fix cast to long (#6301)

* [Torch] fix cast to long

* retrigger

4 years ago[Hexagon] Initial support for Hexagon codegen (#6261)
Krzysztof Parzyszek [Wed, 19 Aug 2020 09:17:07 +0000 (04:17 -0500)]
[Hexagon] Initial support for Hexagon codegen (#6261)

* [Hexagon] Initial support for Hexagon codegen

This commit does not support parallel execution or prefetch.
LLVM 7 or later is required.

* Set native_vector_bits_ based on target features

* Initialize hvx_bytes

* Remove commented out line

4 years ago[Ansor][AutoTVM v2.0] Phase 1: XGBoost Cost Model (#6270)
Lianmin Zheng [Wed, 19 Aug 2020 00:51:10 +0000 (17:51 -0700)]
[Ansor][AutoTVM v2.0] Phase 1: XGBoost Cost Model (#6270)

* port xgb cost model

* add xgboost cost model

* fix lint

* address comments

* address comments

* Fix

4 years ago[Support] Add parallel_for support to run a loop in parallel (#6275)
Chenfan [Tue, 18 Aug 2020 23:21:09 +0000 (07:21 +0800)]
[Support] Add parallel_for support to run a loop in parallel (#6275)

4 years agoAdd tvm::support::hexdump() debug utility (#6154)
Andrew Reusch [Tue, 18 Aug 2020 23:20:38 +0000 (16:20 -0700)]
Add tvm::support::hexdump() debug utility (#6154)

4 years ago[Autodiff] Optimize and eliminate the Jacobian tensor for te.autodiff (#6078)
Yizhi Liu [Tue, 18 Aug 2020 23:19:39 +0000 (16:19 -0700)]
[Autodiff] Optimize and eliminate the Jacobian tensor for te.autodiff (#6078)

* [Autodiff] Optimize and eliminate the Jacobian tensor for te.autodiff

Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
* fix lint

* fix clang-format

* add comments and magic number

* clang-lint

* address some comments

* remove FreeVarsVisitor

* fix constexpr lint

* fix lint

* fix lint

* add Map.Merge

* lint

* change Array::Concat & Map::Merge to global functions

* fix lint

* move functions to global

* static -> inline

Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
4 years ago[RUNTIME][REFACTOR] Use new to avoid exit-time de-allocation order problem in DeviceA...
Tianqi Chen [Tue, 18 Aug 2020 23:08:03 +0000 (16:08 -0700)]
[RUNTIME][REFACTOR] Use new to avoid exit-time de-allocation order problem in DeviceAPI (#6292)

4 years agoGather operation with indices as tensor expr in TFLite frontend (#6168)
Dmitriy Smirnov [Tue, 18 Aug 2020 16:43:29 +0000 (17:43 +0100)]
Gather operation with indices as tensor expr in TFLite frontend (#6168)

* gather with indices as tensor expr

Added handling of indices as tensor expr
to gather operation, unit tests amended
Code cheking out of boundary error refactored
in more "pythonic" way. Fixed bug in negative
axis value normalisation

* replaced with get_tensor_expr

4 years ago[Torch] Support index_select (#6295)
masahi [Tue, 18 Aug 2020 14:06:33 +0000 (23:06 +0900)]
[Torch] Support index_select (#6295)

* support index select

* minor fix

Co-authored-by: masa <masa@pop-os.localdomain>
4 years ago[TEST] use rpc.LocalSession for simple tests (#6294)
Tianqi Chen [Tue, 18 Aug 2020 05:50:57 +0000 (22:50 -0700)]
[TEST] use rpc.LocalSession for simple tests (#6294)

To avoid flaky due to networking.

4 years ago[TOPI] Support int4/int8 conv2d tensor core with HWNC layout (#6121)
GaryYuyjl [Tue, 18 Aug 2020 05:32:30 +0000 (13:32 +0800)]
[TOPI] Support int4/int8 conv2d tensor core with HWNC layout (#6121)

* int4 tensorcore

* a draft for new int4 schedule

* update layout

* add inline option

* clean code

* increase search space

* fix kernel shape

* update intrinsic

* update intrinsic

* support int4/int8 hwnc layout

* remove useless code

* remove useless code

* remove useless code

* remove useless code

* fix int8 transpose

* fix assert

* add asf header

* CI

* CI

* CI

* fix bug

fix bug

Co-authored-by: Leyuan Wang <laurawly@gmail.com>
4 years ago[COMMUNITY] @kparzysz-quic -> committer (#6290)
Tianqi Chen [Mon, 17 Aug 2020 22:45:56 +0000 (15:45 -0700)]
[COMMUNITY] @kparzysz-quic -> committer (#6290)

4 years ago[ONNX] Update slice to infer attributes when not graph inputs (#6276)
Chris Sullivan [Mon, 17 Aug 2020 22:22:51 +0000 (15:22 -0700)]
[ONNX] Update slice to infer attributes when not graph inputs (#6276)

* Update ONNX Slice converter to infer slice attributes when necessary.

* Linting

4 years ago[random] support random fill (#5913)
Zhao Wu [Mon, 17 Aug 2020 16:38:31 +0000 (00:38 +0800)]
[random] support random fill (#5913)

4 years ago[Build] Add cmake options into libinfo (#6286)
Junru Shao [Mon, 17 Aug 2020 14:18:24 +0000 (07:18 -0700)]
[Build] Add cmake options into libinfo (#6286)

* [Build] Add cmake options into libinfo

* Address comments from @tqchen

* Add LLVM version to libinfo

4 years ago[Frontend][Relay] Fix node indices attribute error for tensorflow 2.3 (#6288)
Iswariya Manivannan [Mon, 17 Aug 2020 03:53:38 +0000 (05:53 +0200)]
[Frontend][Relay] Fix node indices attribute error for tensorflow 2.3 (#6288)

* Fix errors caused due to node attributes

* Add node_indices attr for old keras pkg support

4 years agoTVMC - a command line driver for TVM (#6112)
Leandro Nunes [Sun, 16 Aug 2020 17:45:44 +0000 (18:45 +0100)]
TVMC - a command line driver for TVM (#6112)

* Introduce a command line driver to compile, run and tune models, using TVM graph runtime
 * Include tvmc tests and integrate tvmc with linting, testing and CI
 * RFC: https://discuss.tvm.ai/t/rfc-a-tvm-command-line-interface/5165

Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Matthew Barrett <matthew.barrett@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
Co-authored-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Co-authored-by: Matthew Barrett <Matthew.Barrett@arm.com>
Co-authored-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Co-authored-by: Elen Kalda <elen.kalda@arm.com>
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Jeremy Johnson <jeremy.johnson@arm.com>
Co-authored-by: Ina Dobreva <Ina.Dobreva@arm.com>
4 years agoAdd Quantize/Dequantize Partitioning (#5940)
Logan Weber [Sat, 15 Aug 2020 21:48:24 +0000 (14:48 -0700)]
Add Quantize/Dequantize Partitioning (#5940)

* Implement quant/dequant partitioning

on our way

get clooooooser

clean up (part 1)

clean up (part 2)

clean up (part 3)

clean up (part 4)

clean clean

cleaanaannanaaananaananaananaan

clkjsdflkjlfsjdflkj

revert parser changes

add docs

roll lint

roll lint

* add option to toggle fully integral check

* convert dtype collector to C++

* remove need for `with_dtype`

* remove unused imports

* roll lint

* partially address feedback

* roll lint

* upgrade to new parser

* retrigger CI

* roll the dice again

4 years ago[Build] Reflect Compile-Time CMake Options into libtvm.so (#6280)
Junru Shao [Sat, 15 Aug 2020 14:05:40 +0000 (07:05 -0700)]
[Build] Reflect Compile-Time CMake Options into libtvm.so (#6280)

* Initial comit

* Address comments from @tqchen

4 years ago[CI] Update ci-cpu to the latest (#6283)
Tianqi Chen [Sat, 15 Aug 2020 03:41:30 +0000 (20:41 -0700)]
[CI] Update ci-cpu to the latest (#6283)

4 years agoImprove error messages for memory verifier and gpu memory verifier (#6281)
Tristan Konolige [Sat, 15 Aug 2020 03:06:24 +0000 (20:06 -0700)]
Improve error messages for memory verifier and gpu memory verifier (#6281)

* [FIX] Print exactly what issues the GPU memory verifier encountered.

* [FIX] Print exactly why memory verifier failed.