Tang, Shizhi [Sat, 4 Apr 2020 01:49:56 +0000 (09:49 +0800)]
[TE] Support mixing normal and cross-thread reduction (#5193)
* Support mixing normal and cross-thread reduction
* minor improvements
Tianqi Chen [Fri, 3 Apr 2020 22:50:11 +0000 (15:50 -0700)]
[REFACTOR][TIR] Migrate most of low-level build to use the Pass Manager. (#5225)
* [REFACTOR][TIR] Migrate most of low-level build to use the Pass Manager.
- SplitHostDevice
- ThreadSync
- BindDevice
- LowerThreadAllreduce
- Provide a temp fix for printing IRModule with PrimFunc before the formal text printer.
* Address comments, fix tests.
* Fix relay tests
* Explicit move
Tianqi Chen [Fri, 3 Apr 2020 22:24:19 +0000 (15:24 -0700)]
[PYTHON] Make IntImm more like an integer (#5232)
Matthew Brookhart [Fri, 3 Apr 2020 21:35:55 +0000 (14:35 -0700)]
[RELAY] Non-recursive Graph Vistor and Rewriter (#4886)
* First pass a defining a non-recursive Graph Vistor and Rewriter
autoformat
remove a currently empty test until testing is solidfied
* Make CalcDep from Dead Code Elimination non-recursive
* Partially working, not passing all tests yet
passes tests when disabling GetExprRefCount, I think I have a bug in visit counting
fix GetExprRefCount
Fix a subtle bug with nested recursive/non-recursive scopes
* Refactor
* improve comments
* respond to review comments on comments
* Fix a problem with default recursion for dataflow nodes
mark DataflowVisitor methods as override
* implement ScopeMutator
* convert forward_rewrite to ScopeMutator, remove DataflowMutator
* rewrite ExprRewriter and convert fast_math to use it
* switch BiasAddSimplifier to ExprRewriter
fix a clang warning
fix cpp lint
fix doc param error
* respond to review comments
* fix a typo in the iterative looping
* add a regression test for GetExprRefCount issue
* Normalize naming
* fix lint
* First pass a defining a non-recursive Graph Vistor and Rewriter
autoformat
remove a currently empty test until testing is solidfied
* Make CalcDep from Dead Code Elimination non-recursive
* Partially working, not passing all tests yet
passes tests when disabling GetExprRefCount, I think I have a bug in visit counting
fix GetExprRefCount
Fix a subtle bug with nested recursive/non-recursive scopes
* Refactor
* improve comments
* respond to review comments on comments
* Fix a problem with default recursion for dataflow nodes
mark DataflowVisitor methods as override
* implement ScopeMutator
* convert forward_rewrite to ScopeMutator, remove DataflowMutator
* rewrite ExprRewriter and convert fast_math to use it
* switch BiasAddSimplifier to ExprRewriter
fix a clang warning
fix cpp lint
fix doc param error
* respond to review comments
* fix a typo in the iterative looping
* add a regression test for GetExprRefCount issue
* Normalize naming
* fix lint
* respond to review comments
Animesh Jain [Fri, 3 Apr 2020 19:11:32 +0000 (12:11 -0700)]
[TOPI x86] Adding unroll_kw config option for depthwise conv2d. (#5197)
mbaret [Fri, 3 Apr 2020 16:33:15 +0000 (17:33 +0100)]
[RELAY][FIX] Fix hang in MergeCompilerRegions (#5227)
For certain network topologies, MCR could hang.
This patch fixes that case.
Change-Id: I3edd8a8a6b452b2b838b777720adea22a3b995b4
Samuel [Fri, 3 Apr 2020 16:04:41 +0000 (21:34 +0530)]
[KERAS]Upsample3d & ZeroPadding3d op (#5125)
* [KERAS]upsampling3d and zeropadding3d op
* [KERAS]upsampling3d and zeropadding3d test case
* Review comments updated
Samuel [Fri, 3 Apr 2020 13:41:28 +0000 (19:11 +0530)]
[DOCSTRING]missing function parameters updated (#5228)
Wei Pan [Fri, 3 Apr 2020 06:57:40 +0000 (23:57 -0700)]
[CodeGen][CUDA] Fix bugs (#5209)
- Support vectorized casts
- It is incorrect to extract elements from int8x4 with
0x000000ff & (x >> i * 8)
as this value is of type int in C/C++. If this expression
is used for sign extensions, the sign bit will be wrong.
Simply use C style casts instead and sign bits will just work.
Signed-off-by: Wei Pan <weip@nvidia.com>
Tianqi Chen [Thu, 2 Apr 2020 23:56:24 +0000 (16:56 -0700)]
[REFACTOR] tvm.hybrid -> te.hybrid (#5223)
Rationale: The current hybrid module is more aligned with the te part.
We might consider add a new varient of hybrid script that support the unified IR later.
This refactor paves for the potential later changes.
Tianqi Chen [Thu, 2 Apr 2020 23:56:11 +0000 (16:56 -0700)]
[DOCS] Misc docs improvements (#5222)
- Reduce CI docs task log size.
- Update the relation to halide to the latest state.
Samuel [Thu, 2 Apr 2020 22:20:41 +0000 (03:50 +0530)]
[PYTORCH]AvgPool3d, MaxPool3d and Squeeze op support (#5220)
* [PYTORCH]AvgPool3d, MaxPool3d and Squeeze op support
* Testcases added
* review comments
Tianqi Chen [Thu, 2 Apr 2020 20:22:23 +0000 (13:22 -0700)]
[REFACTOR][TIR] Migrate low-level pass functions to Pass Manager, (#5213)
- Migrate LowerTVMBultin
- Migrate inferFragment, LowerThreadAllreduce
- Migrate ThreadSync
- Refactor target::Build to directly take IRModule.
- Remove un-used legacy functions.
Tianqi Chen [Thu, 2 Apr 2020 19:36:55 +0000 (12:36 -0700)]
[TIR] Introduce BufferLoad/Store (#5205)
Co-authored-by: Siyuan Feng <hzfengsy@sjtu.edu.cn>
This PR introduces BufferLoad/Store to TIR. The new nodes will replace
Provide and Call with Tensor arguments in the subsequent refactors.
Haozheng Fan [Thu, 2 Apr 2020 16:04:33 +0000 (00:04 +0800)]
[TIR][PASS] dtype rewrite for indexing variables (#5092)
Zhi [Thu, 2 Apr 2020 15:56:37 +0000 (08:56 -0700)]
[Runtime][Object] expose runtime::String to Python (#5212)
* expose runtime::String to Python
* retrigger ci
Zhi [Thu, 2 Apr 2020 15:30:46 +0000 (08:30 -0700)]
[REFACTOR][IR] kExternalSymbol -> kGlobalSymbol (#5211)
* expose runtime::String to Python
* kExternalSymbol -> kGlobalSymbol
Jeremy Johnson [Thu, 2 Apr 2020 15:29:14 +0000 (16:29 +0100)]
[Frontend][Torch] Fix up graph input handling (#5204)
* [Frontend][Torch] Simplify operator input handling
* [Frontend][Torch] Allow user supplied input names to override graph inputs
* Fix pylint issues
* Updates from code review feedback
* Fix tutorial to use shape list input
* Disable intermittent test failure in topi vision test
Wei Pan [Thu, 2 Apr 2020 02:44:52 +0000 (19:44 -0700)]
[Debug] Add Dump function for Object type (NFC) (#5207)
Signed-off-by: Wei Pan <weip@nvidia.com>
Tianqi Chen [Thu, 2 Apr 2020 02:44:42 +0000 (19:44 -0700)]
[DOCS] Reduce artifcats generated by sphinx gallery (#5208)
Tianqi Chen [Thu, 2 Apr 2020 00:14:49 +0000 (17:14 -0700)]
[REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare (#5206)
* [REFACTOR][TIR] Introduce ExprDeepEqual, Remove IRDeepCompare
This PR introduces ExprDeepEqual which reuses the StructuralEqual infra.
We migrated the usecases of ir_pass::Equal to ExprDeepEqual and StructuralEqual.
* Address comments
mbaret [Wed, 1 Apr 2020 23:16:31 +0000 (00:16 +0100)]
[RELAY] Fixes to MergeCompilerRegions (#5195)
* [RELAY] Fixed issues with MergeCompilerRegions
This PR addresses a few outstanding issues with
the implementation of MergeCompilerRegions. In
particular, it now handles TupleGetItem nodes properly
and other minor bugs related to region merging have
been fixed.
Change-Id: I07783afc56183a6f798a510209f23b0a5f252255
* Fixed issue using pre-merged regions
Change-Id: I0a844ac59bda1089ae0c67cef52f0b0c7ab2cbd7
* Removed some debugging logic
Change-Id: Ib6f2eede6f38bbb270073eb8d4c4dc19f60832c6
* Remove default annotations
Change-Id: I9b7696a51c95871491cbea33c40f92ec327e417f
* Annotate default 'if's
Change-Id: I0098bd1bf6788dd6366810dcefa84f1ebbffaab0
* Clang format
Change-Id: I944365cd3080a97a9261f643a8f1efa5a63cf82b
* Use src/dest in merge
Change-Id: Ie43113492bda8f1ce63eaf9615cb645bb9e2ee86
* Fixed partition test
Change-Id: I46f9e349b1a813a9140f7e4f8a2241687e2df73b
* Removed comments
Change-Id: I309afdd1951d7e796e41d13788aa487707e0ac4c
MORITA Kazutaka [Wed, 1 Apr 2020 22:49:37 +0000 (07:49 +0900)]
[FRONTEND][MXNET] Use leaky by default for LeakyReLU (#5192)
Samuel [Wed, 1 Apr 2020 21:21:50 +0000 (02:51 +0530)]
[PYTORCH]Dropouts And InstanceNorm support added (#5203)
* [PYTORCH]Dropouts And InstanceNorm support added
* Review comments fixed
Samuel [Wed, 1 Apr 2020 19:02:17 +0000 (00:32 +0530)]
[BUGFIX]bugfix in tensorflow space_to_batch_nd (#5175)
* [BUGFIX]bugfix in tensorflow space_to_batch_nd
* Test case added
Tianqi Chen [Wed, 1 Apr 2020 17:55:59 +0000 (10:55 -0700)]
[DOCS] Use https link (#5183)
* [DOCS] Use https link
* use http for sphinx
manupa-arm [Wed, 1 Apr 2020 17:43:44 +0000 (18:43 +0100)]
[RELAY] Partition graph codestyle fixes (#5202)
* [RELAY] Codestyle fixes for Graph Partitioner
*ran through clang-format
* *formatting comments
* *further codestyle changes (after clang-format)
Samuel [Wed, 1 Apr 2020 15:49:03 +0000 (21:19 +0530)]
[PYTORCH]Activations for pytorch (#5194)
* [PYTORCH]Activations for pytorch
* Review comments updated
Tianqi Chen [Wed, 1 Apr 2020 02:44:41 +0000 (19:44 -0700)]
[REFACTOR][TIR] Migrate Low-level Passes to Pass Manager (#5198)
* [TIR][TRANSFORM] Migrate LowerIntrin
* LowerDeviceStorageAccessInfo
* Migrate LowerWarpMemory
Animesh Jain [Tue, 31 Mar 2020 23:57:39 +0000 (16:57 -0700)]
[Topi x86] Missing vectorize for depthwise conv2d. (#5196)
manupa-arm [Tue, 31 Mar 2020 18:27:05 +0000 (19:27 +0100)]
[RELAY] Re-wrote the Graph Partitioner to support multiple outputs (#5143)
* [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
Input : A Relay module that have functions with disjoint annotated regions
using compiler_begin and compiler_end. There could be multiple outputs.
Output : A Relay module with global functions for such disjoint annotated regions
with calls inserted at the respective location
Dependencies : AnnotatedRegionSet Utility class.
Methodology :
1) The AnnotatedRegionSet utility class is able to construct a collection of
nodes that are bound by a give annotation -- here we use compiler_begin
and compiler_end
2) Initially, for each function in the module AnnotatedRegionSets are populated.
3) Then, Vistor pass is traversed until a compiler_end node is encountered
that belongs to a "region".
4) When the first compiler_end of a given annotated region is found, a function is
formed and inserted.
a) if the region has multiple outputs, a Tuple node (capturing all outputs)
is returned.
5) Thereafter, if we encounter an another output of the same annotated region,
it is important to note that the function is already formed. Therefore, it will
lookup the function and add a TupleGetItemNode is inserted.
a) We will use the location index of "rets" of each "Region" of AnnotatedRegionSet
as TupleGetItemNode index.
6) Therefore, functions will be created for all annotated regions. The name for each
global function is created using "Region" id and the compiler name.
Change-Id: I1372f02a845b6d3da03b561763e03a378dca263c
* [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
*removed the expected use-case as we are taking broken-down PR approach
*code style fixes
*some trivial one liners
* [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
*fixed an implicit copy to a move
* [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
*code style changes for comments
*renamed test case multiple outputs --> mixed single multiple outputs
Since the existing test case checks for both single and multiple
output scenarios
*added a new test case with conv2d + batch_norm
*some var name changes in the test
* [RELAY] Re-wrote the Graph Partitioner to support multiple outputs
*rebased
Thomas Viehmann [Tue, 31 Mar 2020 16:37:51 +0000 (18:37 +0200)]
rocm: fix dense_rocblas in strategy, topi (#5191)
Wang Yucheng [Tue, 31 Mar 2020 11:01:10 +0000 (19:01 +0800)]
[Torch] Add support for split (#5174)
* [Torch] Add support for split
* fix
* fix test class
Samuel [Tue, 31 Mar 2020 08:41:41 +0000 (14:11 +0530)]
[FRONTEND][KERAS]Max_pool3d and Averagepool3d operator support (#5085)
* [KERAS]Pool3d support added
* Keras pool3d testcase added
Thierry Moreau [Tue, 31 Mar 2020 05:17:36 +0000 (22:17 -0700)]
[VTA] HW sources refactor (#5188)
* refactor
* path udpate
Andrew Reusch [Tue, 31 Mar 2020 04:14:18 +0000 (21:14 -0700)]
Add warning about nnpack installing googletest (#5185)
hlu1 [Tue, 31 Mar 2020 03:27:20 +0000 (20:27 -0700)]
[TVM] ref_counter -> ref_counter_ (#5184)
Yizhi Liu [Tue, 31 Mar 2020 02:04:43 +0000 (19:04 -0700)]
[TE] reverse-mode autodiff without any optimization (#5121)
* [TE] reverse-mode autodiff without any optimization
Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
* address review comments
* add comments and retrigger CI
* move unittest to debug ci
* move test back and add seed
Co-authored-by: Sergei Grechanik <sergei.grechanik+h@gmail.com>
Animesh Jain [Tue, 31 Mar 2020 02:02:07 +0000 (19:02 -0700)]
[TOPI] Setting workload correctly for Depthwise conv ARM. (#5182)
Tianqi Chen [Mon, 30 Mar 2020 23:41:27 +0000 (16:41 -0700)]
[TEST] Various CI fixes for the VTA and Relay (#5181)
* [VTA] Set the correct type for synchronize
* Fix the legacy API
* Temporary remove the structural equal
Thomas Viehmann [Mon, 30 Mar 2020 22:48:17 +0000 (00:48 +0200)]
rocm: fix miopen convolutions (#5179)
* fix miopen convolutions
* fix overly long lines
Tianqi Chen [Mon, 30 Mar 2020 21:16:18 +0000 (14:16 -0700)]
[DOCS] Point docs to the ASF site. (#5178)
* [DOCS] Point docs to the ASF site.
We have migrated the main docs to the ASF site,
which will be periodically updated using the docs generated by the CI.
Points the docs to the ASF version.
* [CI] Improve the docs generation script
mbaret [Mon, 30 Mar 2020 20:59:10 +0000 (21:59 +0100)]
[RELAY] Add MergeCompilerRegions pass (#5134)
* [RELAY] Add MergeCompilerRegions pass
This pass is part of the flow to support creating compiler
regions with multiple outputs. It should be called after
AnnotateTarget and will merge together regions that share
the same target to create larger compiler regions that can
be off-loaded to external codegens.
This pass implements an algorithm to ensure that during the
merging, no data dependency issues are created. See the tests
for an example of this case.
Co-authored-by: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Co-authored-by: Manupa Karunaratne <manupa.karunaratne@arm.com>
Change-Id: Ibd99083564608d888482f57c5080109f3eefec88
* [RELAY] Annotate compiler_ends on each edge
This alters the behaviour of the AnnotateTarget
pass to enforce the property that all compiler
annotations exist along a single data flow edge.
Specifically, this means they should have exactly
one parent and one child.
Change-Id: I0e74803a77767f4f377d17755a13a74a30909797
* Fix comment
* Rebase *Node::make
* Moved block outside for loop
* Code style
* Update make API
* Remove comment
* Remove redundant 'else's
* Make one line
* Fix comment
* RefWrite
* Fix merge ordering
* Add the RFC example as a test
* [FIX] Fixed merging behaviour in AnnotateRegionSet
Deleting items from a list while iterating it seems to
result in undefined behaviour which sometimes segfaults.
This makes sure all the item deletion happens separately.
* Added checks
* Move comment
* Update comments
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
ga [Mon, 30 Mar 2020 20:45:11 +0000 (16:45 -0400)]
[Dataflow]: nullptr check (#5176)
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
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
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
lfengad [Mon, 30 Mar 2020 07:23:26 +0000 (15:23 +0800)]
Add support for sharing params of operators in tensorflow frontend (#5042)
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
Zhi [Mon, 30 Mar 2020 01:57:27 +0000 (18:57 -0700)]
remove AttrsEqual and AttrsHash related code (#5169)
Zhi [Sun, 29 Mar 2020 20:03:25 +0000 (13:03 -0700)]
relay::StructuralHash to tvm::StructuralHash (#5166)
Zhi [Sun, 29 Mar 2020 16:58:58 +0000 (09:58 -0700)]
[REFACTOR][IR] alpha_equal to structural_equal (#5161)
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
Tianqi Chen [Sun, 29 Mar 2020 05:33:38 +0000 (22:33 -0700)]
[BUILD] Fix VTA build in CI (#5165)
Thierry Moreau [Sun, 29 Mar 2020 00:26:40 +0000 (17:26 -0700)]
[VTA][Refactor] Introducing VTA_HW_PATH for easier migration (#5163)
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>
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
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.
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.
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>
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
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()
Samuel [Thu, 26 Mar 2020 23:59:59 +0000 (05:29 +0530)]
[RUNTIME]crt error handling (#5147)
* crt error handling
* Review comments fixed
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
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
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
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
Ruizhe Zhao [Thu, 26 Mar 2020 02:11:29 +0000 (02:11 +0000)]
Handle empty LLVMModule in GetFunction (#5146)
Wuwei Lin [Wed, 25 Mar 2020 22:27:17 +0000 (18:27 -0400)]
[Tutorial][Quantization] Fix incorrect name of calibration mode (#5150)
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
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
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
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
windclarion [Tue, 24 Mar 2020 15:15:42 +0000 (23:15 +0800)]
[RUNTIME]fix unused-value warning (#5140)
Tianqi Chen [Tue, 24 Mar 2020 08:28:29 +0000 (01:28 -0700)]
[CI] Update rust docker (#5141)
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>
Jared Roesch [Tue, 24 Mar 2020 04:05:02 +0000 (21:05 -0700)]
Change Rust version to stable in Docker (#5138)
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.
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
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
Tianqi Chen [Mon, 23 Mar 2020 17:44:00 +0000 (10:44 -0700)]
[DOCS] Minimize necessary doc change (#5129)
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
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
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
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
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
Neo Chien [Mon, 23 Mar 2020 01:05:19 +0000 (09:05 +0800)]
[DOC][TUTORIAL] Fix typo for deploy_model_on_android.py (#5123)
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.
Haichen Shen [Sun, 22 Mar 2020 16:22:37 +0000 (09:22 -0700)]
Adjust strategy plevel to achieve expected performance by default (#5118)
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
Tianqi Chen [Sun, 22 Mar 2020 16:08:46 +0000 (09:08 -0700)]
Update the tarball deployment. (#5120)
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
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
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
Yagna Srinath Reddy Battula [Sat, 21 Mar 2020 00:29:39 +0000 (17:29 -0700)]
TVM android camera demo (#5005)
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
masahi [Fri, 20 Mar 2020 22:20:13 +0000 (07:20 +0900)]
[TOPI, Relay refactor] Move Dilation2d from nn to image namespace (#5110)
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
Zhi [Fri, 20 Mar 2020 21:29:27 +0000 (14:29 -0700)]
[Fix] Fix CompilerAttrs (#5109)
* fix CompilerAttrs
* retrigger ci