platform/upstream/tvm.git
4 years ago[TFLITE]TOP_K op parser support (#5051)
Samuel [Mon, 30 Mar 2020 20:51:01 +0000 (02:21 +0530)]
[TFLITE]TOP_K op parser support (#5051)

* [TFLITE]TOP_K op parser support

* Testcase updated

4 years ago[Dataflow]: nullptr check (#5176)
ga [Mon, 30 Mar 2020 20:45:11 +0000 (16:45 -0400)]
[Dataflow]: nullptr check (#5176)

4 years ago[Runtime][MISRA-C][Bundle] Bundle deployment with static linking (#5158)
Mehrdad Hessar [Mon, 30 Mar 2020 15:36:08 +0000 (08:36 -0700)]
[Runtime][MISRA-C][Bundle] Bundle deployment with static linking (#5158)

* test file for static link added

* rename files

* Fixed static linking issue

* cleanup

* changed to dynamic and static demo

* MISRA-C static and dynamic test

* cleanup

* cleanup

* Update README.md

* cleanup headers

* update readme

4 years agoCreate a new parameter --cache-from in tvm/docker/build.sh, so that we can point...
Leandro Nunes [Mon, 30 Mar 2020 15:28:41 +0000 (16:28 +0100)]
Create a new parameter --cache-from in tvm/docker/build.sh, so that we can point to an image to be used as cache, from an external (#5173)

script.

 * Adjusts documentation to provide information about new optional
   parameter "--cache-from"
 * Includes --cache-from in the underlying "docker build" command
   triggered by build.sh, when required

4 years ago[CI] Improve VTA build message and scripts. (#5170)
Tianqi Chen [Mon, 30 Mar 2020 15:28:16 +0000 (08:28 -0700)]
[CI] Improve VTA build message and scripts. (#5170)

* [CI] Improve VTA build message and scripts.

* Use absolute path to set the env var

4 years agoAdd support for sharing params of operators in tensorflow frontend (#5042)
lfengad [Mon, 30 Mar 2020 07:23:26 +0000 (15:23 +0800)]
Add support for sharing params of operators in tensorflow frontend (#5042)

4 years ago[DOCS] Various sphinx related fix. (#5168)
Tianqi Chen [Mon, 30 Mar 2020 02:06:58 +0000 (19:06 -0700)]
[DOCS] Various sphinx related fix. (#5168)

* [DOCS] Various sphinx related fix.

- Use :ref: for reference.
- Use :py:class: to refer to API docs.
- Update installation guide to also refer to the download page.
- Only move html contents in doxygen.

* Address review comments

* Update wording

4 years agoremove AttrsEqual and AttrsHash related code (#5169)
Zhi [Mon, 30 Mar 2020 01:57:27 +0000 (18:57 -0700)]
remove AttrsEqual and AttrsHash related code (#5169)

4 years agorelay::StructuralHash to tvm::StructuralHash (#5166)
Zhi [Sun, 29 Mar 2020 20:03:25 +0000 (13:03 -0700)]
relay::StructuralHash to tvm::StructuralHash (#5166)

4 years ago[REFACTOR][IR] alpha_equal to structural_equal (#5161)
Zhi [Sun, 29 Mar 2020 16:58:58 +0000 (09:58 -0700)]
[REFACTOR][IR] alpha_equal to structural_equal (#5161)

4 years ago[CI] Move build configuration to shell scripts (#5164)
Tianqi Chen [Sun, 29 Mar 2020 05:34:25 +0000 (22:34 -0700)]
[CI] Move build configuration to shell scripts (#5164)

* [BUILD] Fix VTA build in CI

* [CI] Move build configuration to shell scripts

4 years ago[BUILD] Fix VTA build in CI (#5165)
Tianqi Chen [Sun, 29 Mar 2020 05:33:38 +0000 (22:33 -0700)]
[BUILD] Fix VTA build in CI (#5165)

4 years ago[VTA][Refactor] Introducing VTA_HW_PATH for easier migration (#5163)
Thierry Moreau [Sun, 29 Mar 2020 00:26:40 +0000 (17:26 -0700)]
[VTA][Refactor] Introducing VTA_HW_PATH for easier migration (#5163)

4 years ago[NODE][IR] Introduce StructuralHash for the Unified IR. (#5160)
Tianqi Chen [Sat, 28 Mar 2020 23:53:04 +0000 (16:53 -0700)]
[NODE][IR] Introduce StructuralHash for the Unified IR. (#5160)

* [NODE][IR] Introduce StructuralHash for the Unified IR.

This PR introduces a new way to handle structural hash for the unified IR.

- Each object can now register an optional SEqualHash function, which
  describes how to reduce its structural equality to sequence of hash values.
- Optionally, the object can choose to allow labeling of vars(e.g. function parameters)
  by calling DefHash
- We implemented a non-recursive structural hasher that maintains its own stack
  to traverse te IR.

This PR also improves the hash value property from the previous relay's hash utility.
In particular, the graph node mode hashs a DAG differently from a tree
by attaching an unique occurence index to each graph node.

In all of the test cases so far, structural_hash is consistent with structural_equal.
- if structrual(x, y) then structural_hash(x) == structural_hash(y)
- if structural_hash(x) == structural_hash(y) then highly likely structural_equal(x, y)
  - hash no collison is found in our testcases.

Ideally we should work on automatically generating these functions in the future.

* Fix cases for EnvFunc and Array dims

* fix testcase

* Update src/node/structural_hash.cc

Co-Authored-By: 雾雨魔理沙 <lolisa@marisa.moe>
Co-authored-by: 雾雨魔理沙 <lolisa@marisa.moe>
4 years ago[NODE][IR] Introduce StructuralEqual Infra for the unified IR. (#5154)
Tianqi Chen [Sat, 28 Mar 2020 05:21:00 +0000 (22:21 -0700)]
[NODE][IR] Introduce StructuralEqual Infra for the unified IR. (#5154)

* [NODE][IR] Introduce StructuralEqual Infra for the Unified IR.

This PR introduces a new way to handle structural equality
for both TIR and relay nodes in an extensive way.

- Each object can now register an optional SEqualReduce function, which
  describes how to reduce its structural equality to another instance
  into equality of the children.
- Optionally, the object can choose to allow remapping of vars(e.g. function parameters)
  by calling DefEqual
- We implemented a non-recursive structural equality checker that
  recursively traverses the objects and does the structural equality checking.

This PR also fixes a few potential problems in previous relay's AlphaEqual.

- In particular, the new structural equality relation will be communicative.
- It is can be dangerous to use same_as relation to quickly check equality,
  demonstrated by the following case. (%x, %y) are shared vars between two functions.

- function0: fn (%x, %y) { %x + %y }
- function1: fn (%y, %x) { %x + %y }

The new structural equal is intented to supersede AlphaEqual and AttrsEqual.

Follow-up PRs should be performed to redirect the existing usages, and removes
the corresponding implementation.

* Update the rule to distinguish between graph node and non-graph nodes.

* Refactor the test cases to use structural equal.

* address comments

* Mark more relay::Expr as graph node, fix a testcase issue(was bug that was not caught by previous alpha equal)

* Remove unrelated comment

* Fix file comment

* Address review comment

* Relax condition to fit flaky case

4 years ago[Relay][Frontend][Pytorch] Fixed ConvTranspose2D parsing (#5157)
Josh Fromm [Sat, 28 Mar 2020 03:35:51 +0000 (20:35 -0700)]
[Relay][Frontend][Pytorch] Fixed ConvTranspose2D parsing (#5157)

* Fixed conv transpose parsing.

* small format change.

* Chage test module names.

* Simplified test syntax.

4 years agoAdding support for QNN subtract op (#5153)
shoubhik [Sat, 28 Mar 2020 01:38:35 +0000 (18:38 -0700)]
Adding support for QNN subtract op (#5153)

* Adding support for QNN subtract op

* Fixing typo.

* Fixing typo.

* Fixing lint.

* Addressing review comments.

* Renaming variables as per convention and renamed QnnBinaryOpTypes -> QnnBinaryOpType

* Renaming QnnBinaryOpType to QnnBinaryOpTensorType which now takes the index you want to extract to make the code more readable.

* Fixing lint.

* Moving common code to macro.

* Fixing alignment.

* Fixing typo.

* Fixing lint.

* Renaming method to pass CI.

4 years ago[TOPI][Tensor Core] Conv2d and Dense ops support on Tensor Core (#5099)
Shawn-Inspur [Fri, 27 Mar 2020 23:20:40 +0000 (07:20 +0800)]
[TOPI][Tensor Core] Conv2d and Dense ops support on Tensor Core (#5099)

* [TOPI][Tensor Core] Optimization of CNNs on Tensor Core #6004

* update conv2d test

* # pylint: dense_tensorcore.py

* modify

* modify conv2d

* modify the unclear comment,add shape assertion in conv2d compute,combine general gemm intrinsic

* add shape assertion in conv2d compute, combine general gemm intrinsic

Co-authored-by: libaihong <libaihong@inspur.com>
Co-authored-by: libaihong <61525430+libaihong@users.noreply.github.com>
4 years ago[External Codegen] Fix annotate pass static variable (#5023)
mbaret [Fri, 27 Mar 2020 16:19:01 +0000 (16:19 +0000)]
[External Codegen] Fix annotate pass static variable (#5023)

'fannotate' in the annotate_target pass was designated as
static. This meant that if you use the pass to annotate
more than one codegen, its value is not updated when the
target changes resulting in incorrect annotation.

Change-Id: Ib4f3af5cfbef44f29771818219755198ac313a0e

4 years ago[Relay][MergeComposite] Support TupleGetItem in body of pattern (#5106)
Trevor Morris [Fri, 27 Mar 2020 15:47:31 +0000 (08:47 -0700)]
[Relay][MergeComposite] Support TupleGetItem in body of pattern (#5106)

* Support TupleGetItemNode in body of pattern only

* Add bn_relu test case for MergeComposite with TupleGetItem

* formatting

* TupleGetItemNode::make -> TupleGetItem()

4 years ago[RUNTIME]crt error handling (#5147)
Samuel [Thu, 26 Mar 2020 23:59:59 +0000 (05:29 +0530)]
[RUNTIME]crt error handling (#5147)

* crt error handling

* Review comments fixed

4 years ago[Relay][OP] Register topi schedule for Relay fast_exp and fast_tanh (#5131)
Selo1412 [Thu, 26 Mar 2020 17:30:38 +0000 (01:30 +0800)]
[Relay][OP] Register topi schedule for Relay fast_exp and fast_tanh (#5131)

* register for fast_exp and fast_tanh

* Add unit test for fast math

* Add unit test for op fast math

* Add unit test for op fast math

* Add unit tests to guard registering topi schedule for Relay fast_exp and fast_tanh

* Fix ident

* Fix the indent

* Add fast_tanh in the test_fastmath of topi tests

4 years ago[Doc] TVM release process (#5151)
Yizhi Liu [Thu, 26 Mar 2020 16:01:14 +0000 (09:01 -0700)]
[Doc] TVM release process (#5151)

* [Doc] TVM release process

* fix tag

* remove things not apply

4 years ago[RELAY] Added a AnnotatedRegion utility class (#5030)
mbaret [Thu, 26 Mar 2020 08:14:57 +0000 (08:14 +0000)]
[RELAY] Added a AnnotatedRegion utility class (#5030)

* [RELAY] Added an AnnotatedRegionSet utility class

In many of the passes involved in graph partitioning,
we need to extract and manipulate annotated regions.
This class simplifies the extraction of regions from a relay
expression containing region begin and end annotations
as well as providing utility functions to query these
regions and merge them.

Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Change-Id: Ia912fea0b99f64b6a7197aa6da2347e58f469fbb

* Rename fix

* Update MakeRegions

* Fix __init__

* Indentation

* Code style

* Remove 'Region' from docs

* Overload [] to get region

* Use src/dest for MergeRegions

* Simplify merge

* Tidy const loop vars

4 years ago[Strategy][ARM CPU] Remove contrib spatial pack schedule of depthwise convolution...
Zhao Wu [Thu, 26 Mar 2020 05:10:00 +0000 (13:10 +0800)]
[Strategy][ARM CPU] Remove contrib spatial pack schedule of depthwise convolution (#5148)

* [Strategy][ARM CPU] Low the plevel of contrib spatial pack of depthwise convolution

* address comments

4 years agoHandle empty LLVMModule in GetFunction (#5146)
Ruizhe Zhao [Thu, 26 Mar 2020 02:11:29 +0000 (02:11 +0000)]
Handle empty LLVMModule in GetFunction (#5146)

4 years ago[Tutorial][Quantization] Fix incorrect name of calibration mode (#5150)
Wuwei Lin [Wed, 25 Mar 2020 22:27:17 +0000 (18:27 -0400)]
[Tutorial][Quantization] Fix incorrect name of calibration mode (#5150)

4 years agoDuplicate likely nodes added when loop axis split unevenly (#5084)
ANSHUMAN TRIPATHY [Wed, 25 Mar 2020 21:46:18 +0000 (03:16 +0530)]
Duplicate likely nodes added when loop axis split unevenly (#5084)

* [TE][Schedule] Duplicate likely nodes removed

* [1] Test case added

* [2] Lint error fixed

* [3] Review comments handled

* [4] Review comments handled

4 years ago[Torch] Add support for max_pool1d (#5142)
Wang Yucheng [Tue, 24 Mar 2020 21:18:48 +0000 (05:18 +0800)]
[Torch] Add support for max_pool1d (#5142)

* [Torch] Add support for max_pool1d

* add test

* fix line-too-long

* remove wrapper class

4 years ago[Torch] Fix conv2d conversion for group conv (group > 1 but != in channels) (#5132)
masahi [Tue, 24 Mar 2020 17:10:03 +0000 (02:10 +0900)]
[Torch] Fix conv2d conversion for group conv (group > 1 but != in channels) (#5132)

* Fix conv2d conversion for group conv

* add more comment for clarification

4 years ago[REFACTOR][TIR] Introduce PrimFuncPass. (#5139)
Tianqi Chen [Tue, 24 Mar 2020 15:15:54 +0000 (08:15 -0700)]
[REFACTOR][TIR] Introduce PrimFuncPass. (#5139)

* [REFACTOR][TIR] Introduce PrimFuncPass.

- Introduce PrimFuncPass
- Convert one pass to the unified Pass API.

* Address comments

* Fix comments

4 years ago[RUNTIME]fix unused-value warning (#5140)
windclarion [Tue, 24 Mar 2020 15:15:42 +0000 (23:15 +0800)]
[RUNTIME]fix unused-value warning (#5140)

4 years ago[CI] Update rust docker (#5141)
Tianqi Chen [Tue, 24 Mar 2020 08:28:29 +0000 (01:28 -0700)]
[CI] Update rust docker (#5141)

4 years ago[Relay] GradientCell Relay Pass (#5039)
Andrew Liu [Tue, 24 Mar 2020 06:56:28 +0000 (23:56 -0700)]
[Relay] GradientCell Relay Pass (#5039)

* save

* gradient.rly

* fix

* NOT WORKING: gradient cell pass

* test gradient pass

* fixed basic call ops

* more tests

* fix bug

* transform calls to one ones_like zero zero_like

* maintenance stuff

* fix linting

* linting

* linting

* throw default

* remove unrelated changes

* import gradent.rly in pass

* comment

* linting

* remove changes to test files

* move gradient_cell.cc to transforms

* revert change

* update files with new commits

* type

* wrapper function to main outermost function type

* fix linting

* fix unsigned and signed int comparison

* review

* GetConstructor definition in module and change op comparison

* update node instantiations

* increase code readability

Co-authored-by: Marisa Kirisame <lolisa@marisa.moe>
4 years agoChange Rust version to stable in Docker (#5138)
Jared Roesch [Tue, 24 Mar 2020 04:05:02 +0000 (21:05 -0700)]
Change Rust version to stable in Docker (#5138)

4 years agoFix for issue #4831. The data_min_idx and data_max_idx were flipped. (#5136)
shoubhik [Tue, 24 Mar 2020 01:33:51 +0000 (18:33 -0700)]
Fix for issue #4831. The data_min_idx and data_max_idx were flipped. (#5136)

Existing test cases cover this fix. In addition I have added an assert to make sure that the data_min is always less than equal to data_max.

4 years agoAdd thrust support for nms (#5116)
Leyuan Wang [Mon, 23 Mar 2020 23:52:33 +0000 (16:52 -0700)]
Add thrust support for nms (#5116)

* add argsort_nms_thrust

* consider valid count in thrust nms sort

* make thrust optional

* typo

* typo

* fix pylint

* address some of the comments

* address more comments

* fix lint

* address more comments

* address more comments

4 years ago[Refactor] Relay Node::make to constructor (#5128)
Zhi [Mon, 23 Mar 2020 18:15:07 +0000 (11:15 -0700)]
[Refactor] Relay Node::make to constructor (#5128)

* relay Node::make to constructor

* patternwildcard

* Address comments

4 years ago[DOCS] Minimize necessary doc change (#5129)
Tianqi Chen [Mon, 23 Mar 2020 17:44:00 +0000 (10:44 -0700)]
[DOCS] Minimize necessary doc change (#5129)

4 years ago[Frontend][TensorFlow]TensorFlow Parser Control Flow Enhancement (#5020)
Yao Wang [Mon, 23 Mar 2020 17:28:19 +0000 (10:28 -0700)]
[Frontend][TensorFlow]TensorFlow Parser Control Flow Enhancement (#5020)

* Improve TF control flow major logic

* Pass mod into operator convert function

* Fix LoopBound

* Add more control flow tests

* Add two test cases for stridedslice

* Fix docstring

* Fix lint

* Fix import

* Fix test assert

* Minor fix conv3d

* Add more comments

* Fix for dilation2d

* Change newly added atan

* Change newly added unravel

4 years ago[Bugfix] Fixed bug where shifting by out-of-bounds value results in no compute code...
pankratz [Mon, 23 Mar 2020 15:47:29 +0000 (09:47 -0600)]
[Bugfix] Fixed bug where shifting by out-of-bounds value results in no compute code being emitted. (#5115)

* Fixed bug where shifting by out-of-bounds RHS values results in LLVM to codegen nothing. Added regression testcase

* Updated testcase to be more precise.

* Fixed testcase

4 years ago[Relay, Topi, TF Frontend] Isfinite operator (#4981)
Mahesh Ambule [Mon, 23 Mar 2020 11:17:12 +0000 (16:47 +0530)]
[Relay, Topi, TF Frontend] Isfinite operator (#4981)

* isfinite doc update

* isfinit expr

* isfinit expr

* isfinite schedule reg

* isfinite python binding

* isfinite python binding

* relay register isfinite

* isfinite type relation

* intrin isfinite

* topi isfinite

* testcase topi isfinite

* tf frontend isfinite

* tf frontend isfinite testcase

* test case relay isfinite

* small fixes

* test forward tf isfinite

* test cases injective for cuda

* remove float16 test case

* add support for isinf

* remove unwanted import

* fix conflict

4 years ago[Relay, Topi] [TF, MXNet] Unravel Index operator (#5082)
Mahesh Ambule [Mon, 23 Mar 2020 01:40:54 +0000 (07:10 +0530)]
[Relay, Topi] [TF, MXNet] Unravel Index operator (#5082)

* first cut unravel_index

* merge fixes

* change rates to dilations

* unravel_index op relay, topi, mxnet, tf

* doc changes

* small changes

* remove empty unravel and argwhere attrs

* remove empty unravel and argwhere attrs

4 years ago[DOCS] Cleanup docs before rebuild (#5127)
Tianqi Chen [Mon, 23 Mar 2020 01:15:19 +0000 (18:15 -0700)]
[DOCS] Cleanup docs before rebuild (#5127)

* [DOCS] Cleanup docs before rebuild

* Ask doxygen to generate svg to minimize the file size

4 years ago[DOC][TUTORIAL] Fix typo for deploy_model_on_android.py (#5123)
Neo Chien [Mon, 23 Mar 2020 01:05:19 +0000 (09:05 +0800)]
[DOC][TUTORIAL] Fix typo for deploy_model_on_android.py (#5123)

4 years ago[CodeGen][CUDA] Vectorization for intrinsics (#5101)
Wei Pan [Sun, 22 Mar 2020 19:22:29 +0000 (12:22 -0700)]
[CodeGen][CUDA] Vectorization for intrinsics (#5101)

- This allows to emit vectorized loads/stores
  for CUDA math intrinsics.

- A few intrinsics should be lowered as CUDAMath not CUDAFastMath ones.

- Fixed the code block identation.

4 years agoAdjust strategy plevel to achieve expected performance by default (#5118)
Haichen Shen [Sun, 22 Mar 2020 16:22:37 +0000 (09:22 -0700)]
Adjust strategy plevel to achieve expected performance by default (#5118)

4 years ago[Rust] Fix the existing test cases before refactoring. (#5122)
Jared Roesch [Sun, 22 Mar 2020 16:22:18 +0000 (09:22 -0700)]
[Rust] Fix the existing test cases before refactoring.  (#5122)

* Fix up the final pieces

* Tweak build.rs

4 years agoUpdate the tarball deployment. (#5120)
Tianqi Chen [Sun, 22 Mar 2020 16:08:46 +0000 (09:08 -0700)]
Update the tarball deployment. (#5120)

4 years ago[DOCS] include a tarball of docs, add a security faq (#5119)
Tianqi Chen [Sun, 22 Mar 2020 03:27:13 +0000 (20:27 -0700)]
[DOCS] include a tarball of docs, add a security faq (#5119)

* [DOCS] include a tarball of docs during deployment

* [DOCS] Add a short security faq

4 years ago[KERAS] conv3d frontend operator support (#5080)
Samuel [Sat, 21 Mar 2020 13:18:41 +0000 (18:48 +0530)]
[KERAS] conv3d frontend operator support (#5080)

* [KERAS]Conv3d support added

* Keras conv3d testcase added

4 years ago[docs] Update relay docs (#5112)
Zhi [Sat, 21 Mar 2020 02:58:48 +0000 (19:58 -0700)]
[docs] Update relay docs (#5112)

* Update relay docs

* any -> py:func

* make clean

4 years agoTVM android camera demo (#5005)
Yagna Srinath Reddy Battula [Sat, 21 Mar 2020 00:29:39 +0000 (17:29 -0700)]
TVM android camera demo (#5005)

4 years ago[Relay][TF] Support for Atan/Atan2 in Relay Tensorflow frontend converter. (#5104)
Andrew Liu [Fri, 20 Mar 2020 23:08:22 +0000 (16:08 -0700)]
[Relay][TF] Support for Atan/Atan2 in Relay Tensorflow frontend converter. (#5104)

* add Atan/Atan2 op

* fix bug and testing

4 years ago[TOPI, Relay refactor] Move Dilation2d from nn to image namespace (#5110)
masahi [Fri, 20 Mar 2020 22:20:13 +0000 (07:20 +0900)]
[TOPI, Relay refactor] Move Dilation2d from nn to image namespace (#5110)

4 years ago[Relay][BYOCG] Propagate constant to subgraphs (#5094)
Zhi [Fri, 20 Mar 2020 21:51:09 +0000 (14:51 -0700)]
[Relay][BYOCG] Propagate constant to subgraphs (#5094)

* bind constant to subgraphs

* con -> constant

4 years ago[Fix] Fix CompilerAttrs (#5109)
Zhi [Fri, 20 Mar 2020 21:29:27 +0000 (14:29 -0700)]
[Fix] Fix CompilerAttrs (#5109)

* fix CompilerAttrs

* retrigger ci

4 years ago[TOPI][OP] Use Thrust sort for argsort and topk (#5097)
MORITA Kazutaka [Fri, 20 Mar 2020 17:00:23 +0000 (02:00 +0900)]
[TOPI][OP] Use Thrust sort for argsort and topk (#5097)

* [TOPI][OP] Use Thrust sort for argsort and topk

The current GPU sort implementation (odd-even transposition sort) is too slow
when the number of elements is large.  This PR introduces Thrust implementation
of sort which is much faster.

Note that this change requires CMake 3.8 or later since we have to use nvcc to
compile a thrust code.

* cmake: make CUDA optional

* allow .cu file to be into the repository

* pylint fix and cleanup

* require cmake 3.8 only when thrust is enabled

* fix nvcc compiler error when passing -pthread

* add missing include

* add USE_THRUST option in config.cmake

* retrigger CI

* retrigger CI

4 years ago[AutoTVM] Temporary fix to the stack overflow issue in autotvm task extraction (...
Haichen Shen [Fri, 20 Mar 2020 16:26:40 +0000 (09:26 -0700)]
[AutoTVM] Temporary fix to the stack overflow issue in autotvm task extraction (#5019)

* Temporary fix to the stack overflow issue in autotvm task extraction

* fix lint

* fix graph tuner test

4 years agoAdd colors to compute_at edges and thread/block indices. (#5111)
yongfeng-nv [Fri, 20 Mar 2020 16:21:45 +0000 (12:21 -0400)]
Add colors to compute_at edges and thread/block indices. (#5111)

4 years ago[TIR][TARGET] Refactor Target codegen to use IRModule and PrimFunc. (#5107)
Tianqi Chen [Fri, 20 Mar 2020 04:02:50 +0000 (21:02 -0700)]
[TIR][TARGET] Refactor Target codegen to use IRModule and PrimFunc. (#5107)

As part of the unified IR refactor.
This PR refactors the target codegen to use IRModule containing tir::PrimFuncs.

In order to break the refactor into several steps without breaking the codebase,
we built an conversion pass to convert Array<LoweredFunc> into IRModule.

The follow-up refactors will gradually move the passes covered by IRModule up
until we cover all the passes. Then we can remove the additional redundant
concepts such as LoweredFunc.

4 years ago[Torch] Add initial 3D op support and test on Resnet 3D (#5075)
masahi [Thu, 19 Mar 2020 20:39:04 +0000 (05:39 +0900)]
[Torch] Add initial 3D op support and test on Resnet 3D (#5075)

* fix minor lint issue

* add conv3d and adaptive avg pool3d conversion with test

* fix max pool handling

* add batch norm 3d test

* add resnet 3d test

* add more conv3d test

* clean up batch norm test

* add note on disabling inception v3 test

* add more tests

* add more tests

* fix names

4 years ago[DOC] Add doc for Relay op strategy (#5078)
Haichen Shen [Thu, 19 Mar 2020 19:22:34 +0000 (12:22 -0700)]
[DOC] Add doc for Relay op strategy (#5078)

* [DOC] Add doc for Relay op strategy

* update

* address more comments

* update

* update

4 years ago[Relay][Frontend][ONNX] operator support NonZero (#5073)
Neo Chien [Thu, 19 Mar 2020 16:49:07 +0000 (00:49 +0800)]
[Relay][Frontend][ONNX] operator support NonZero (#5073)

* [Relay][Frontend][ONNX] operator support: NonZero

* update

* Solve the build fail

* solve the build fail

* Replace ctx_list with tvm.cpu()

4 years ago[ConvertLayout] Support QNN ops. (#5066)
Animesh Jain [Thu, 19 Mar 2020 03:03:56 +0000 (20:03 -0700)]
[ConvertLayout] Support QNN ops. (#5066)

* [ConvertLayout] Support QNN ops.

* Changing layouts to C.

* Fixing dilation.

* Empty commit.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-53-55.us-west-2.compute.internal>
4 years ago[TUTORIAL] Fix vta tutorial after relay function refactor (#5095)
Tianqi Chen [Wed, 18 Mar 2020 23:39:18 +0000 (16:39 -0700)]
[TUTORIAL] Fix vta tutorial after relay function refactor (#5095)

4 years ago[Torch, QNN] Add missing upcast to uint8 avg_pool conversion (#5089)
masahi [Wed, 18 Mar 2020 17:31:06 +0000 (02:31 +0900)]
[Torch, QNN] Add missing upcast to uint8 avg_pool conversion  (#5089)

* add missing upcast to avgpool

* add avg pool test

4 years ago[RELAY] Codegen_c.h should include relay.function (#5093)
lhutton1 [Wed, 18 Mar 2020 17:21:05 +0000 (17:21 +0000)]
[RELAY] Codegen_c.h should include relay.function (#5093)

Change-Id: I015b2c66a50b64d0eb2e9efe336f6c18ea1fdc67

4 years agoDescription updated for pooling attributes (#5091)
Samuel [Wed, 18 Mar 2020 16:06:00 +0000 (21:36 +0530)]
Description updated for pooling attributes (#5091)

4 years ago[CODEGEN][OPENCL] Explicitly cast min/max operands (#5090)
MORITA Kazutaka [Wed, 18 Mar 2020 16:05:49 +0000 (01:05 +0900)]
[CODEGEN][OPENCL] Explicitly cast min/max operands (#5090)

* [CODEGEN][OPENCL] Explicitly cast min/max operands

* retrigger CI

4 years agocreate function.py (#5087)
Zhi [Wed, 18 Mar 2020 15:56:55 +0000 (08:56 -0700)]
create function.py (#5087)

4 years agoReplace UseDefaultCompiler with GetAttr (#5088)
Zhi [Wed, 18 Mar 2020 03:01:15 +0000 (20:01 -0700)]
Replace UseDefaultCompiler with GetAttr (#5088)

4 years agoChange Azure pipeline badge to GH actions (#5081)
Tianqi Chen [Tue, 17 Mar 2020 20:23:43 +0000 (13:23 -0700)]
Change Azure pipeline badge to GH actions (#5081)

4 years ago[RELAY][PY] Fix relay node registration after refactor (#5083)
Tianqi Chen [Tue, 17 Mar 2020 17:59:23 +0000 (10:59 -0700)]
[RELAY][PY] Fix relay node registration after refactor (#5083)

4 years ago[Refactor][Relay] Refactor Relay Python to use new FFI (#5077)
Zhi [Tue, 17 Mar 2020 15:33:10 +0000 (08:33 -0700)]
[Refactor][Relay] Refactor Relay Python to use new FFI (#5077)

* refactor relay python

* revert relay/ir/*.py to relay

* Address comments

* remove direct access to analysis and transform namespace

4 years ago[Relay, TF Frontend] Dilation2D operator support (#5033)
Mahesh Ambule [Tue, 17 Mar 2020 06:54:32 +0000 (12:24 +0530)]
[Relay, TF Frontend] Dilation2D operator support (#5033)

* update docs for dilation 2d

* dilation2d compute

* dilation2d register

* dilation2d rel compute

* dilation2d strategy

* dilation2d attrs

* dilation2d generic schedule

* dilation2d tf frontend support

* dilation2d tf frontend test case

* dilation2d test cases

* pylint fixes

* add exception for cuda target

* Update docstring

* Update docstring

* change rates to dilations

* removed unused param

* merge master

* Update nn.py

* Update nn.py

4 years ago[TFLITE]DepthToSpace and SpaceToDepth support (#5041)
Samuel [Mon, 16 Mar 2020 19:57:06 +0000 (01:27 +0530)]
[TFLITE]DepthToSpace and SpaceToDepth support (#5041)

* [TFLITE]DepthToSpace and SpaceToDepth op parser support

* DepthToSpace and SpaceToDepth testcases

* Review comments fixed

4 years agoTensorflow script upgrade from 1.13.1 to 2.0.0, so that it can run in both versionsw...
Samuel [Mon, 16 Mar 2020 19:55:48 +0000 (01:25 +0530)]
Tensorflow script upgrade from 1.13.1 to 2.0.0, so that it can run in both versionsw (#4963)

4 years agoReturn empty CSourceModule when no lowered_funcs exists in Relay mod (#4847)
Ruizhe Zhao [Mon, 16 Mar 2020 19:52:45 +0000 (19:52 +0000)]
Return empty CSourceModule when no lowered_funcs exists in Relay mod (#4847)

* Use dummy func when no lowered_funcs exists in Relay mod

* Dummy func -> CSourceModule with empty code str

* Added comments describing the empty CSouceModule

* Always import external modules w/o assertions

* Use CSourceModule as a fallback for LLVMModule

* Changed cond for target == llvm

* Create an empty LLVM module w/o using dummy func

* Avoid using IR str concat to create LLVM module

* Improved comments for codegen.LLVMModuleCreate

* Satisfy the linter for LLVMModuleCreate

4 years ago[Team] jwfromm -> reviewer (#5076)
Yizhi Liu [Mon, 16 Mar 2020 10:01:54 +0000 (03:01 -0700)]
[Team] jwfromm -> reviewer (#5076)

4 years ago[IR] Update the type_keys to reflect the code-org (#5074)
Tianqi Chen [Sun, 15 Mar 2020 22:39:47 +0000 (15:39 -0700)]
[IR] Update the type_keys to reflect the code-org (#5074)

4 years ago[Relay, TOPI] Refactor Adaptive pool and add 3d support (#5049)
masahi [Sun, 15 Mar 2020 20:43:48 +0000 (05:43 +0900)]
[Relay, TOPI] Refactor Adaptive pool and add 3d support (#5049)

* add stub for nd impl

* refactored indices compute

* refactored divide step

* remove unused variables, add doc

* fix lint

* add relay op def

* add python registration

* refactor topi test

* update relay tests, but test result is weird

* workaround for weird bug

* add relay adaptive pool 3d test

* add topi tests

* update doc for 3d

* typo fix

* fix lint

* add more tests including NDHWC

4 years agoAdd support for FusedBatchNormV3 (#5065)
ojotoxy [Sun, 15 Mar 2020 19:02:59 +0000 (12:02 -0700)]
Add support for FusedBatchNormV3 (#5065)

No changes seem to be needed to _fused_batch_norm. It just works.

4 years ago[TESTS] Triage the testcases to fit the the new namespaces (#5071)
Tianqi Chen [Sun, 15 Mar 2020 04:40:50 +0000 (21:40 -0700)]
[TESTS] Triage the testcases to fit the the new namespaces (#5071)

* [TESTS] Triage the testcases to fit the naming convention of the new namespaces

* Remove multiple usage of system lib to avoid test problems

4 years ago[TIR] Introduce tir::PrimFunc (#5070)
Tianqi Chen [Sat, 14 Mar 2020 21:26:23 +0000 (14:26 -0700)]
[TIR] Introduce tir::PrimFunc (#5070)

This PR introduces tir::PrimFunc which will be used as the TIR function
container in the unified IR.

Also streamlined the function attributes a bit further.
- All common attributes are under tvm::attr
- TIR specific attributes are under tvm::tir::attr and comes with a tir prefix
- Use stl_style for attributes for now

4 years ago[COMMUNITY] Add @abergeron -> reviewer (#5064)
Jared Roesch [Sat, 14 Mar 2020 04:02:03 +0000 (21:02 -0700)]
[COMMUNITY] Add @abergeron -> reviewer (#5064)

4 years ago[Torch, QNN] Remove FP32 piggy back and use QNN add/mul/concatenate (#5061)
masahi [Fri, 13 Mar 2020 22:11:32 +0000 (07:11 +0900)]
[Torch, QNN] Remove FP32 piggy back and use QNN add/mul/concatenate (#5061)

* use qnn add/mul/concatenate

* remove logging

4 years ago[Relay][AutoTVM] Bug Fix for ARM CPUs. Lower strict assumption. (#5063)
Bernhard [Fri, 13 Mar 2020 21:44:14 +0000 (22:44 +0100)]
[Relay][AutoTVM] Bug Fix for ARM CPUs. Lower strict assumption. (#5063)

4 years ago[Relay][Pass] Add submodule extraction pass (#4960)
anwang2009 [Fri, 13 Mar 2020 20:58:49 +0000 (13:58 -0700)]
[Relay][Pass] Add submodule extraction pass (#4960)

* rebased

* fix lint

4 years ago[Graph tuner]Add opt out operator for has_multiple_inputs for graph tuner (#5000)
zhen-jia [Fri, 13 Mar 2020 17:07:06 +0000 (10:07 -0700)]
[Graph tuner]Add opt out operator for has_multiple_inputs for graph tuner (#5000)

* consider layout_transform in has_multiple_inputs

* refactor code

* remove debug info

* remove subclass assignment

* refactoring a little bit

* remove default value

* remove trailing whitespace

* modify test for has_multiple_inputs

Co-authored-by: Ubuntu <ubuntu@ip-172-31-40-194.us-west-2.compute.internal>
4 years ago[DOCS] Move git_howto to rst, add Stage documents to te (#5055)
Tianqi Chen [Fri, 13 Mar 2020 03:23:56 +0000 (20:23 -0700)]
[DOCS] Move git_howto to rst, add Stage documents to te (#5055)

4 years ago[PY] Require python3.6 (#5057)
Tianqi Chen [Fri, 13 Mar 2020 03:22:38 +0000 (20:22 -0700)]
[PY] Require python3.6 (#5057)

4 years agomaintenance (#5058)
Andrew Liu [Fri, 13 Mar 2020 00:22:19 +0000 (17:22 -0700)]
maintenance (#5058)

4 years ago[Bugfix][IR][ATTRS] Fix AttrEqual for Array and StrMap, double (#5054)
Tianqi Chen [Thu, 12 Mar 2020 23:29:06 +0000 (16:29 -0700)]
[Bugfix][IR][ATTRS] Fix AttrEqual for Array and StrMap, double (#5054)

- Use fuzzy comparison for double.
- Removed the hack for BatchNormAttrs and DictAttr.

Also removed a warning from text printer printing.

4 years ago[C++] Require c++14 by default (#5056)
Tianqi Chen [Thu, 12 Mar 2020 22:31:56 +0000 (15:31 -0700)]
[C++] Require c++14 by default (#5056)

4 years agoCI: Install apt-transport-https (#5053)
Marcus Shawcroft [Thu, 12 Mar 2020 17:13:22 +0000 (17:13 +0000)]
CI: Install apt-transport-https (#5053)

The ubuntu_install_llvm.sh script started failing because of a http to
https redirect.  This patch adds the package that allows apt to handle
https transport.

Change-Id: I70bcba32a9fc75d02c54f4f21f288b2f46226689

4 years ago[Autotvm] Fix autotvm customized template (#5034)
Haichen Shen [Thu, 12 Mar 2020 17:01:22 +0000 (10:01 -0700)]
[Autotvm] Fix autotvm customized template (#5034)

* init

* fix template

* tweak naming

4 years ago[Strategy] Support for Int8 schedules - CUDA/x86 (#5031)
Animesh Jain [Thu, 12 Mar 2020 16:51:09 +0000 (09:51 -0700)]
[Strategy] Support for Int8 schedules - CUDA/x86 (#5031)

* [CUDA] Op strategy changes for Int8 schedules.

* Applying Haichen's suggestions.

* Make 4D output work for task extraction.

* Make x86 work.

* Fix lint.

* Lint fixes.

* Tests, comments, out channel a multiple of 4.

* Topi test.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-38-96.us-west-2.compute.internal>
4 years ago[1] Test case modified for int type (#5012)
ANSHUMAN TRIPATHY [Thu, 12 Mar 2020 16:50:13 +0000 (22:20 +0530)]
[1] Test case modified for int type (#5012)

4 years agoFixed div by zero core dump. Fixed rounding intrinsics on int crash (#5026)
pankratz [Thu, 12 Mar 2020 16:35:36 +0000 (10:35 -0600)]
Fixed div by zero core dump. Fixed rounding intrinsics on int crash (#5026)