platform/upstream/tvm.git
4 years agoRemove unnecessary print (#5642)
Cody Yu [Thu, 21 May 2020 22:09:28 +0000 (15:09 -0700)]
Remove unnecessary print (#5642)

4 years ago[PYTORCH]Padding support (#5638)
Samuel [Thu, 21 May 2020 20:44:17 +0000 (02:14 +0530)]
[PYTORCH]Padding support (#5638)

4 years ago[RUNTIME][VULKAN] Seg fault in WorkspacePool's destructor (#5632) (#5636)
Yi Wang [Thu, 21 May 2020 19:07:54 +0000 (12:07 -0700)]
[RUNTIME][VULKAN] Seg fault in WorkspacePool's destructor (#5632) (#5636)

* [RUNTIME][VULKAN] Seg fault in WorkspacePool's destructor (#5632)
* fixed this issue by changing WorkspacePool's destruction order

* make line < 100 charactors long

4 years ago[DOCS] Fix the QNN TFLite tutorial build (#5641)
Tianqi Chen [Thu, 21 May 2020 17:22:31 +0000 (10:22 -0700)]
[DOCS] Fix the QNN TFLite tutorial build (#5641)

* [TUTORIAL] Fix execution error of TFLite quantized tutorial

* Assign TensorCore to docs build

4 years agoExtend AttrPattern to support CallNode and FunctionNode attributes (#5637)
Matthew Brookhart [Thu, 21 May 2020 03:16:40 +0000 (20:16 -0700)]
Extend AttrPattern to support CallNode and FunctionNode attributes (#5637)

* Extend AttrPattern to support CallNode and FunctionNode attributes

* Update tutorial and add breaks

* add func attr test

4 years ago[TUTORIAL]TFLite QNN Tutorial (#5595)
Samuel [Thu, 21 May 2020 00:39:14 +0000 (06:09 +0530)]
[TUTORIAL]TFLite QNN Tutorial (#5595)

* [TUTORIAL]TFLite QNN Tutorial

* Review comments

4 years ago[RELAY][PYTORCH]Resize3d, Upsample3d op support (#5633)
Samuel [Thu, 21 May 2020 00:35:28 +0000 (06:05 +0530)]
[RELAY][PYTORCH]Resize3d, Upsample3d op support (#5633)

4 years agoLabel Pattern Partitions (#5627)
Matthew Brookhart [Thu, 21 May 2020 00:28:43 +0000 (17:28 -0700)]
Label Pattern Partitions (#5627)

* Label Pattern Partitions with a default label to prevent nested partitions and an optional user supplied-label

* Add node names in topological order to Partitioned attribute

* respond to review comments

* move partition tag into const in attr namespace

4 years agoFix typo in test script (#5635)
Wuwei Lin [Wed, 20 May 2020 22:12:37 +0000 (18:12 -0400)]
Fix typo in test script (#5635)

4 years agoanother cmake fix (#5630)
Thierry Moreau [Wed, 20 May 2020 22:12:28 +0000 (15:12 -0700)]
another cmake fix (#5630)

4 years ago[NODE][PASS] Introduce config to PassContext. (#5631)
Tianqi Chen [Wed, 20 May 2020 21:54:11 +0000 (14:54 -0700)]
[NODE][PASS] Introduce config to PassContext. (#5631)

This PR introduces a new config field to the PassContext
to allow it store arbitary config values.

To make sure that the config is validated, we allow each pass
to register the config key they would expect and the corresponding types.

We also introduce a CreateObject from Map<str, Object> to allow config creation
from a json-nest(like in vscode) in python.

We added an example of UnrollLoopConfig.

Followup PR should migrate the passes to use the new config field.

4 years ago[RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph (#5616)
manupa-arm [Wed, 20 May 2020 15:27:54 +0000 (16:27 +0100)]
[RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph (#5616)

* [RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph

If the annotated compiler region contains multiple outputs where
some of the outputs are tuple output, the current PartitionGraph will
create tuple of tuples. This will not be handled by the runtime.
This commit flattens the such tuples and re-create them after the
call site of the partitioned function.

Change-Id: I4e7ccbda73c129a9f4ae8705d5c9f2af6ab99ef6

* [RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph

    *code refactor : extracted the passes as a sequential

Change-Id: If4bc00b00a96fa244358d602fc1a361498342f46

* [RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph
   *further refactor

Change-Id: I69ddd0e835e88ef97da8a3a3b949be3f7b619c02

* [RELAY][BYOC] Fix the creation of tuple of tuples in PartitionGraph
    *class description comment amended

Change-Id: I55720bf0467c96e979e1ab56c40d9d209e0f9456

4 years ago[DOCS] Move the api docs to the api subfolder (#5626)
Tianqi Chen [Wed, 20 May 2020 04:40:06 +0000 (21:40 -0700)]
[DOCS] Move the api docs to the api subfolder (#5626)

* [DOCS] Move the api docs to the api subfolder

* Update numpydoc location

* Ignore 403

* make sure folder exists

4 years ago[BYOC][MergeComposite] if root->args[i] isn't a CallNode, then Donwcast<Call> will...
windclarion [Wed, 20 May 2020 01:10:50 +0000 (09:10 +0800)]
[BYOC][MergeComposite] if root->args[i] isn't a CallNode, then Donwcast<Call> will check fail (#5623)

we needn't execute L131 "call_map->Set(arg, new_arg)", because when arg
is CallNode and root->args[i] is not CallNode, new_arg will be a null
pointer. There is no point in caching null pointer.

Signed-off-by: windclarion <windclarion@gmail.com>
4 years ago[PYTORCH]ReflectionPad2d op (#5624)
Samuel [Wed, 20 May 2020 01:10:23 +0000 (06:40 +0530)]
[PYTORCH]ReflectionPad2d op (#5624)

4 years ago[MXNET]MaxPool3d and AvgPool3d Ops support added (#5614)
Samuel [Wed, 20 May 2020 01:09:44 +0000 (06:39 +0530)]
[MXNET]MaxPool3d and AvgPool3d Ops support added (#5614)

4 years ago[Frontend][Tensorflow] Gather nd bug fix for one dim support in tensorflow (#5588)
ANSHUMAN TRIPATHY [Tue, 19 May 2020 19:45:02 +0000 (01:15 +0530)]
[Frontend][Tensorflow] Gather nd bug fix for one dim support in tensorflow (#5588)

* [Frontend][Tensorflow] Gather_nd one dim support added

* Test case added

* Doc error handled

* Review comment handled: reverting new attr introduced

* Check added at mxnet frontend

* Doc error handled

* TFLite test case failure resolved

4 years agoFix three typos (#5620)
Liyong Zeng [Tue, 19 May 2020 14:10:01 +0000 (22:10 +0800)]
Fix three typos (#5620)

Co-authored-by: Zeng Liyong <liyong.zeng@streamcomputing.com>
4 years ago[IOS] Fix build error of iOS RPC (#5621)
MORITA Kazutaka [Tue, 19 May 2020 14:09:18 +0000 (23:09 +0900)]
[IOS] Fix build error of iOS RPC (#5621)

* [IOS] Fix build error of iOS RPC

- Update to C++14
- Use the latest RPC protocol
- Resolve CoreML dependency

* Fix clang-format error

4 years ago[KERAS]Global MaxPool3d and AvgPool3d support (#5098)
Samuel [Tue, 19 May 2020 12:24:25 +0000 (17:54 +0530)]
[KERAS]Global MaxPool3d and AvgPool3d support (#5098)

4 years ago[Relay][Refactor][std::string --> String] Relay updated with String (#5578)
ANSHUMAN TRIPATHY [Mon, 18 May 2020 22:13:11 +0000 (03:43 +0530)]
[Relay][Refactor][std::string --> String] Relay updated with String (#5578)

4 years ago[Relay]Improve Shape Func handling for Tuple inputs (#5467)
Yao Wang [Mon, 18 May 2020 19:27:32 +0000 (12:27 -0700)]
[Relay]Improve Shape Func handling for Tuple inputs (#5467)

* Improve Shape Func handling for Tuple inputs

* Fix lint

* Improve

* Fix build

4 years ago[BYOC] Remove kCompiler attr from external functions (#5615)
lhutton1 [Mon, 18 May 2020 17:47:56 +0000 (18:47 +0100)]
[BYOC] Remove kCompiler attr from external functions (#5615)

Functions destined for external codegen keep their kCompiler attribute which means SkipFunction returns true when running a pass over such functions during the codegen step. This makes sense during graph partitioning, however when lowering the functions for codegen the is no reason to keep this behaviour.

Allowing this behaviour will mean a codegen can run a pass on functions only intended for one 3rd party library. Specifically, allowing pre-processing of a series of sub-graphs right before it is passes through codegen. This helps ensure that the functions destined for the 3rd party library are in the expected format. For example, we may want to ensure that these functions have a kernel layout of OHWI because the 3rd party library only supports OHWI. This wouldn't be possible before partitioning the graph as we don't know how the graph will be partitioned ahead of time.

Change-Id: Ia68b9da335ef1acfc405a8528aac823de60a65c2

4 years agofix pattern topological order (#5612)
Matthew Brookhart [Mon, 18 May 2020 17:12:49 +0000 (10:12 -0700)]
fix pattern topological order (#5612)

4 years agoFix a typo. (#5611)
Liyong Zeng [Mon, 18 May 2020 14:30:15 +0000 (22:30 +0800)]
Fix a typo. (#5611)

Co-authored-by: Zeng Liyong <liyong.zeng@streamcomputing.com>
4 years ago[CUDA] Fix codegen for warp shuffle intrinsics (#5606)
Shizhi Tang [Mon, 18 May 2020 02:55:05 +0000 (10:55 +0800)]
[CUDA] Fix codegen for warp shuffle intrinsics (#5606)

* fix shfl intrin

* improve test_lower_warp_memory_cuda_half_a_warp

4 years ago[TFLITE]GATHER_ND (#5508)
Dhruva Ray [Mon, 18 May 2020 02:48:17 +0000 (08:18 +0530)]
[TFLITE]GATHER_ND (#5508)

Signed-off-by: Dhruva Ray <dhruvaray@gmail.com>
4 years ago[REFACTOR][IR] Streamline ir/op Registry (#5609)
Tianqi Chen [Sun, 17 May 2020 22:43:11 +0000 (15:43 -0700)]
[REFACTOR][IR] Streamline ir/op Registry (#5609)

* [REFACTOR][IR] Streamline ir/op Registry

This PR refactors the attrregistry mechanism in the ir/op into
a separate common base. The common base will provide a foundation
for other attr related registries such as target and pass.

We also streamlines the terminology of the registry API.

- Use AttrMap for the column maps returned by the registry
- Use RegEntry to refer to the registry entry.

* Address review comments

4 years agofix rpc server bug on VTA (#5607)
Thierry Moreau [Sat, 16 May 2020 16:08:59 +0000 (09:08 -0700)]
fix rpc server bug on VTA (#5607)

4 years ago[PYTORCH]Matmul fix for batch_matmul (#5604)
Samuel [Fri, 15 May 2020 21:43:23 +0000 (03:13 +0530)]
[PYTORCH]Matmul fix for batch_matmul (#5604)

4 years ago[PYTORCH]ImplicitTensorToNum support added (#5603)
Samuel [Fri, 15 May 2020 21:41:57 +0000 (03:11 +0530)]
[PYTORCH]ImplicitTensorToNum support added (#5603)

4 years agoAdd debug mode to tempdir() (#5581)
Andrew Reusch [Fri, 15 May 2020 21:39:45 +0000 (14:39 -0700)]
Add debug mode to tempdir() (#5581)

4 years ago[LLVM] Represent alignment information in LLVM IR (#5598)
Krzysztof Parzyszek [Fri, 15 May 2020 21:39:21 +0000 (16:39 -0500)]
[LLVM] Represent alignment information in LLVM IR (#5598)

4 years agoFix TVMArray layout on device (#5599)
Andrew Reusch [Fri, 15 May 2020 21:38:39 +0000 (14:38 -0700)]
Fix TVMArray layout on device (#5599)

4 years ago[Reduction] Fix cross thread redunction (#5551)
Wei Pan [Fri, 15 May 2020 21:28:19 +0000 (14:28 -0700)]
[Reduction] Fix cross thread redunction (#5551)

- The predictions were not correctly applied after transformation.
  This leads to normal reduction itervar appearing outside of the loop,
  which is undefined. See detailed comments.

Signed-off-by: Wei Pan <weip@nvidia.com>
4 years agoPattern Language, Matcher, Rewriter, and Function Paritioner (#5231)
Matthew Brookhart [Fri, 15 May 2020 19:42:51 +0000 (12:42 -0700)]
Pattern Language, Matcher, Rewriter, and Function Paritioner (#5231)

4 years agoAdd ostream formatters for TargetPtr/TargetVal. (#5592)
Andrew Reusch [Fri, 15 May 2020 16:27:44 +0000 (09:27 -0700)]
Add ostream formatters for TargetPtr/TargetVal. (#5592)

4 years ago[Relay][VM] Memory planner (part 1) (#5144)
Jared Roesch [Fri, 15 May 2020 04:46:21 +0000 (21:46 -0700)]
[Relay][VM] Memory planner (part 1) (#5144)

* Start on memory planning

WIP

Move to test_memory_passes.py

Work on memory planning

Post-rebase and VM changes

Plumb through the offsets

Basic tests all pass, fix offset to data buffer.

Fix compile errors

Fix ws

Apply suggestions from code review

Co-Authored-By: Haichen Shen <shenhaichen@gmail.com>
Address CR

Update src/runtime/vm/vm.cc

Co-Authored-By: Haichen Shen <shenhaichen@gmail.com>
Fix another comment

Fix lint

Fix

Fix

Fix

Lint is done?

Fix

More fix

Trying to debug

No clue

Fix lint

* Fix docs

* Disable aggressive constant eval

* It works

* Fix lint

* Found issue with dynamic

* Fix the pass, but runtime segfaults

* fix scalar tensor, test_any_elemwise passes

* Fix split pass

* Fix 0-rank issues

* Fix

* debug

* apply Haichen's patch and clean up

* lintgit add .

* fix serializer and test_tyck_alloc_tensor test

* Fix the constant lift pass in presence of closures

* Restore old finder

* Fix rebase issues

* Fix

* Fix

* Fix issue coercing the shapes incorrectly from i64 to i32

* Fix linting

* Fix clang format

* Format memory.cc

* Fix 0-rank case

* Add fix for (0,) shape

* Ignore shapes for now

* Apply suggestions from code review

Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
* Update src/runtime/vm/executable.cc

Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
* Fix

* lint

Co-authored-by: Zhi Chen <chzhi@amazon.com>
Co-authored-by: Zhi <5145158+zhiics@users.noreply.github.com>
4 years ago[TFLite Runtime] Fix bug and re-enable RPC execution test (#5436)
Michal Piszczek [Fri, 15 May 2020 03:16:57 +0000 (20:16 -0700)]
[TFLite Runtime] Fix bug and re-enable RPC execution test (#5436)

4 years agoOverestimate binary size for microTVM compiled binaries. (#5590)
Andrew Reusch [Thu, 14 May 2020 20:33:43 +0000 (13:33 -0700)]
Overestimate binary size for microTVM compiled binaries. (#5590)

* Overestimate binary size for microTVM compiled binaries.

 * Currently uTVM binary section sizes are computed by summing the
   sizes of all symbols in the section.
 * This method produces errors because it presumes the linker works in
   a particular way, rather than analyzing the linked output.
 * As we intend to move away from linking inside TVM (RFC
   forthcoming), just using this stopgap to make forward progress
   until then.

* address weberlo comments

* fix regression (use 64 bit word size)

4 years ago[DOCS] Improve document in reflection (#5593)
Liangfu Chen [Thu, 14 May 2020 14:59:53 +0000 (22:59 +0800)]
[DOCS] Improve document in reflection (#5593)

4 years agoFix JSON graph dumping. (#5591)
Andrew Reusch [Thu, 14 May 2020 01:20:26 +0000 (18:20 -0700)]
Fix JSON graph dumping. (#5591)

* Previously this function placed a JSON-escaped string containing
   the JSON-encoded graph.

4 years ago[Hexagon] One more fix for concurrency count (#5589)
Krzysztof Parzyszek [Thu, 14 May 2020 00:16:14 +0000 (19:16 -0500)]
[Hexagon] One more fix for concurrency count (#5589)

4 years ago[MXNET]abs, round, reciprocal, sign, softsign, hard_sigmoid (#5587)
Samuel [Wed, 13 May 2020 21:01:36 +0000 (02:31 +0530)]
[MXNET]abs, round, reciprocal, sign, softsign, hard_sigmoid (#5587)

4 years ago[Relay][Transform] Safe check added for Merge Composite (#5562)
ANSHUMAN TRIPATHY [Wed, 13 May 2020 20:16:49 +0000 (01:46 +0530)]
[Relay][Transform] Safe check added for Merge Composite (#5562)

4 years agoAdd a quantized conv2 unit test for the tflite front-end (#5558)
Giuseppe Rossini [Wed, 13 May 2020 18:11:15 +0000 (19:11 +0100)]
Add a quantized conv2 unit test for the tflite front-end (#5558)

Signed-off-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
4 years ago[RELAY][Convert Layout] Specify additional layouts in convert layout pass (#5422)
lhutton1 [Wed, 13 May 2020 18:08:32 +0000 (19:08 +0100)]
[RELAY][Convert Layout] Specify additional layouts in convert layout pass (#5422)

* [RELAY] Specify additional layouts in convert layout pass

* This patch means that you can specify an additional layout, rather than using the layout chosen by default during conversion.
* This is specifically useful for external codegen when a 3rd party library needs to target a specific kernel layout for example.

Change-Id: I3ef9cf45ead574801870a38af9768f93e29aab10

* Use mapping of op name to list of desired layouts

Change-Id: Ibd691a3cb93e73a394f36112668ad52a84c7d5a2

* Fix issue with code block

Change-Id: Ibb4e38c05ad4312b7dea845be699b8d5d57e0a94

* Address comments, Improve tutorial

Change-Id: Ib824eead329d551c338234de3b2d814693afd0ec

* Fix linting

Change-Id: Ie9e1891f590b3a7496a56ff8362cdda9d4b5fa75

* Test uses NCHW default layout. Unrelated issue with NHWC.

Change-Id: I1c16f0db73db56f5e9536db3fe5eb2624c3b595c

* Fix mistake in tutorial

Change-Id: I944041245d27af262dc96f1cd8117f1f19272062

* Address multiple comments

Change-Id: If33a1e34acd8fc37d1c7797ee189a6448a392672

* Improve tutorial

Change-Id: Ib04142c94c7958ab5067947d2ff4c84354e3d0c5

* Fix Clang-format

Change-Id: Ieff39e3f0817d22579c68b3287e972a3b0fcfbc8

4 years agoFix the runtime raise error (#5586)
LiangLiu [Wed, 13 May 2020 15:49:21 +0000 (23:49 +0800)]
Fix the runtime raise error (#5586)

4 years agoAdd prim::device op (#5584)
Candy [Wed, 13 May 2020 07:07:31 +0000 (15:07 +0800)]
Add prim::device op (#5584)

4 years ago[RELAY][TF] Support symbolic newshape for Reshape (#5429)
lixiaoquan [Wed, 13 May 2020 06:37:33 +0000 (14:37 +0800)]
[RELAY][TF] Support symbolic newshape for Reshape (#5429)

* [RELAY][TF] Support symbolic newshape for Reshape

* Only need to pass data

* Use MakeReshape() in Reshape()

* Change newshape to Expr

* Create a template for Array<T>

* Fuse reshape when newshape is constant

* Make newshape Optional

* Use bool() of Optional

Co-authored-by: Li Xiaoquan <xiaoquan.li@denglin.ai>
4 years ago[Relay] Fixed bug in attribute parsing for pool layers. (#5582)
Josh Fromm [Wed, 13 May 2020 06:23:56 +0000 (23:23 -0700)]
[Relay] Fixed bug in attribute parsing for pool layers. (#5582)

* Fixed pooling bug.

* Added tests and fixed more cases.

4 years ago[PYTORCH] Support max_pool2d_with_indices (#5549)
Trevor Morris [Wed, 13 May 2020 06:21:16 +0000 (23:21 -0700)]
[PYTORCH] Support max_pool2d_with_indices (#5549)

* Use real output name instead of node_name

* Add pytorch max_pool2d_with_indices converter.

* Add test for maxpool2d with indices

* Add explicit assert for single output

* Only consume output (not indices) from max pool 2d with indices

* undo change

4 years ago[CI] Enable llvm-11 and llvm-10 in build tests, recover webdocs. (#5579)
Tianqi Chen [Wed, 13 May 2020 02:31:45 +0000 (19:31 -0700)]
[CI] Enable llvm-11 and llvm-10 in build tests, recover webdocs. (#5579)

This PR ties up the last loosen end of the recent CI update.

4 years ago[PYTORCH]expand bug fix (#5576)
Samuel [Wed, 13 May 2020 00:09:41 +0000 (05:39 +0530)]
[PYTORCH]expand bug fix (#5576)

4 years agoAllow ubuntu_install_darknet.sh to work in both 18.04 and 16.04 (#5574)
Ramana Radhakrishnan [Tue, 12 May 2020 21:27:05 +0000 (22:27 +0100)]
Allow ubuntu_install_darknet.sh to work in both 18.04 and 16.04 (#5574)

4 years ago[CI] Fix clang-format error (#5577)
Tianqi Chen [Tue, 12 May 2020 17:06:09 +0000 (10:06 -0700)]
[CI] Fix clang-format error (#5577)

4 years ago[Relay] enable blocking format in x86 conv2d and fold scale axis (#5357)
Menooker [Tue, 12 May 2020 14:36:53 +0000 (22:36 +0800)]
[Relay] enable blocking format in x86 conv2d and fold scale axis (#5357)

4 years ago[CI] Update the ci-gpu to the lastest build with the new vulkansdk. (#5571)
Tianqi Chen [Tue, 12 May 2020 09:41:04 +0000 (02:41 -0700)]
[CI] Update the ci-gpu to the lastest build with the new vulkansdk. (#5571)

4 years ago[LINT] Enable clang-format. (#5572)
Tianqi Chen [Tue, 12 May 2020 05:18:36 +0000 (22:18 -0700)]
[LINT] Enable clang-format. (#5572)

* [LINT] Enable clang-format.

* Add more docs

4 years ago[TARGET] Phase out WebGL (#5570)
Tianqi Chen [Tue, 12 May 2020 02:53:00 +0000 (19:53 -0700)]
[TARGET] Phase out WebGL (#5570)

The graphics API is moving towards next generation.
Vulkan/Metal on the native and WebGPU on the web.

Due to the limited programming model, we cannot get the best compute performance in WebGL.
Now that the mainline already have both WebGPU and vulkan support, this PR phases out WebGL.

4 years ago[DOCKER] Add clang-format and nodejs to ci-lint (#5567)
Tianqi Chen [Tue, 12 May 2020 01:43:55 +0000 (18:43 -0700)]
[DOCKER] Add clang-format and nodejs to ci-lint (#5567)

4 years ago[CI] Update ci-lint to use the latest image that contains clang-format (#5568)
Tianqi Chen [Tue, 12 May 2020 01:43:47 +0000 (18:43 -0700)]
[CI] Update ci-lint to use the latest image that contains clang-format (#5568)

4 years ago[CI] reintroduce docker stage for wasm tests (#5565)
Tianqi Chen [Mon, 11 May 2020 23:24:18 +0000 (16:24 -0700)]
[CI] reintroduce docker stage for wasm tests (#5565)

* [DOCKER] Introduce ci-wasm

* Add Jenkinsfile

* Rename prepare to prepwasm so it won't run by default

4 years ago[DOCKER] Fix vulkansdk in the ci-gpu (#5566)
Tianqi Chen [Mon, 11 May 2020 22:28:04 +0000 (15:28 -0700)]
[DOCKER] Fix vulkansdk in the ci-gpu (#5566)

4 years ago[Refactor][std::string --> String] IR is updated with String (#5547)
ANSHUMAN TRIPATHY [Mon, 11 May 2020 19:08:04 +0000 (00:38 +0530)]
[Refactor][std::string --> String] IR is updated with String (#5547)

* [std::string --> String] GlobalTypeVar is updated with String

* [std::string --> String] GlobalVar is updated with String

* [std::string --> String][IR] ADT is updated with String

* [std::string --> String][IR] OP is updated with String

* [std::string --> String][IR] Attrs is updated with String input

* [std::string --> String][IR] GlobalVar is updated with String

* [std::string --> String][Test] Pyconverter is updated with String change

4 years agoFix topi test for tensorcore (#5563)
Ramana Radhakrishnan [Mon, 11 May 2020 19:00:26 +0000 (20:00 +0100)]
Fix topi test for tensorcore (#5563)

4 years ago[FRONTEND]onnx, mxnet, pytorch mathops added (#5561)
Samuel [Mon, 11 May 2020 18:56:23 +0000 (00:26 +0530)]
[FRONTEND]onnx, mxnet, pytorch mathops added (#5561)

4 years ago[Fix] Fix conv2d alter op for arm cpu (#5532)
Haichen Shen [Mon, 11 May 2020 17:26:03 +0000 (10:26 -0700)]
[Fix] Fix conv2d alter op for arm cpu (#5532)

4 years ago[CI] Update ci-cpu to bionic (#5554)
Tianqi Chen [Mon, 11 May 2020 16:04:28 +0000 (09:04 -0700)]
[CI] Update ci-cpu to bionic (#5554)

4 years ago[CI] Update ci-cpu to bionic (#5555)
Tianqi Chen [Mon, 11 May 2020 16:04:20 +0000 (09:04 -0700)]
[CI] Update ci-cpu to bionic (#5555)

4 years ago[WEB] Setup lint, doc, test (#5556)
Tianqi Chen [Mon, 11 May 2020 16:04:08 +0000 (09:04 -0700)]
[WEB] Setup lint, doc, test (#5556)

4 years ago[BYOC, MergeComposite] Add additional check before re-using the cached match (#5552)
masahi [Mon, 11 May 2020 12:00:43 +0000 (21:00 +0900)]
[BYOC, MergeComposite] Add additional check before re-using the cached match (#5552)

* Add additional check before re-using the cached match in merge composite

* clean up ExtractPattern calls

4 years ago[LINT] clang-format the h,cc,m files. (#5557)
Tianqi Chen [Mon, 11 May 2020 04:43:33 +0000 (21:43 -0700)]
[LINT] clang-format the h,cc,m files. (#5557)

This PR prepares for our migration to use the clang-format
as part of the linter system.

4 years ago[RUNTIME] Hexagon driver for offloading kernels to simulator (#5492)
Krzysztof Parzyszek [Mon, 11 May 2020 03:05:59 +0000 (22:05 -0500)]
[RUNTIME] Hexagon driver for offloading kernels to simulator (#5492)

* [RUNTIME] Hexagon driver for offloading kernels to simulator

* Add sim_dev as external project when building with Hexagon/sim support

* Change target CPU for sim_dev to v60

4 years ago[TOPI][RELAY][TENSORFLOW]Math ops added (#5502)
Samuel [Mon, 11 May 2020 00:32:00 +0000 (06:02 +0530)]
[TOPI][RELAY][TENSORFLOW]Math ops added (#5502)

* [TOPI][RELAY][TENSORFLOW]Math ops added

* Extra newline removed

* CI fix

* Review comments fixed

* Review comments fixed

4 years ago[WEB] WebGPU support (#5545)
Tianqi Chen [Sat, 9 May 2020 23:59:18 +0000 (16:59 -0700)]
[WEB] WebGPU support (#5545)

This PR introduces WebGPU support to tvm.
The WebGPU runtime is directly built in javascript(as WebGPU uses JS as the first class citizen API)
and exposes back to the tvm's runtime via PackedFuncs.

One important note is that `ctx.sync` is not async.
This is due to the fact that WebGPU is a purely async API and we cannot block in the web environment.

So the current best way to use the js api is to wrap things in an async function.
When copy a GPU array to CPU, `await ctx.sync()` need to be called to wait for copy completion.

We use a AsyncIO rpc server to serve the async functions to the clients.

4 years agoApparently, ONNX Conv with no 'pads' defaults to zero padding (#5548)
Matthew Brookhart [Sat, 9 May 2020 23:54:39 +0000 (16:54 -0700)]
Apparently, ONNX Conv with no 'pads' defaults to zero padding (#5548)

4 years ago[CI] Install wasmtime for WebAssembly tests (#5494)
MORITA Kazutaka [Sat, 9 May 2020 23:01:12 +0000 (08:01 +0900)]
[CI] Install wasmtime for WebAssembly tests (#5494)

4 years agoA clone of test/python/unittest/test_runtime_micro.py, however (#5546)
Tom Gall [Sat, 9 May 2020 15:45:05 +0000 (10:45 -0500)]
A clone of test/python/unittest/test_runtime_micro.py, however (#5546)

modified to run specifically on ARM cortex-M hardware, which
currently is just the STM32F746 discovery board.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
4 years ago[Optimization] Warp level reduction support for CUDA (#5498)
Wei Pan [Sat, 9 May 2020 15:38:38 +0000 (08:38 -0700)]
[Optimization] Warp level reduction support for CUDA (#5498)

- Added the warp level reduction support

- Upgraded shfl intrinsics to the sync version.

- This is the building block for scheduling softmax like operations.

Signed-off-by: Wei Pan <weip@nvidia.com>
4 years ago[TIR][Printer] text format printer considering future parsing use (#5483)
Bohan Hou [Sat, 9 May 2020 15:35:58 +0000 (23:35 +0800)]
[TIR][Printer] text format printer considering future parsing use (#5483)

4 years ago[TE] Fix MakeLoopNest for warp memory (#5382)
Tang, Shizhi [Sat, 9 May 2020 00:52:30 +0000 (08:52 +0800)]
[TE] Fix MakeLoopNest for warp memory (#5382)

4 years ago[Rust] Add first stage of updating and rewriting Rust bindings. (#5526)
Jared Roesch [Fri, 8 May 2020 23:53:47 +0000 (16:53 -0700)]
[Rust] Add first stage of updating and rewriting Rust bindings. (#5526)

* Add tvm-sys

* Use as_mut_ptr

* Address CR feedback

* Update rust/tvm-sys/src/datatype.rs

Co-authored-by: Nick Hynes <nhynes@berkeley.edu>
* Final CR comments

* Fix find and replace error in frontend

Co-authored-by: Nick Hynes <nhynes@berkeley.edu>
4 years ago[RPC] Improve RPCServer AsyncIO support. (#5544)
Tianqi Chen [Fri, 8 May 2020 22:55:22 +0000 (15:55 -0700)]
[RPC] Improve RPCServer AsyncIO support. (#5544)

* [RPC] Improve RPCServer AsyncIO support.

When the RPCServer is in the async IO mode, it is possible for the server
to directly serve async function that may return its value via a callback in the future.
This mode is particular useful to the web environment, where blocking is not an option.

This PR introduces the Async support to the RPCSession, allowing the AsyncIO driven servers
to serve the async functions. These functions will still be presented as synchronized version
on the client side.

Followup PR will refactor the web runtime to make use of this feature.

* Address comments

4 years agoLoad platform specific lib for tvmdsoop instead of only so (#5542)
tobe [Fri, 8 May 2020 19:42:22 +0000 (03:42 +0800)]
Load platform specific lib for tvmdsoop instead of only so (#5542)

4 years ago[CRT]fix to reduce RAM size during loading model (#5507)
Samuel [Fri, 8 May 2020 17:10:57 +0000 (22:40 +0530)]
[CRT]fix to reduce RAM size during loading model (#5507)

* [CRT]fix to reduce RAM size during loading model

* Release graph_json memory immediately after reading

4 years agofix restructured text (#5541)
Thierry Moreau [Fri, 8 May 2020 16:52:50 +0000 (09:52 -0700)]
fix restructured text (#5541)

4 years agoAdd Onnx Pad v11 (#5539)
Matthew Brookhart [Fri, 8 May 2020 06:37:45 +0000 (23:37 -0700)]
Add Onnx Pad v11 (#5539)

4 years agoChanges to cpp_rpc to make it work on Android (+ Hexagon offloading) (#5535)
Krzysztof Parzyszek [Fri, 8 May 2020 03:36:36 +0000 (22:36 -0500)]
Changes to cpp_rpc to make it work on Android (+ Hexagon offloading) (#5535)

* Changes to cpp_rpc to make it work on Android (+ Hexagon offloading)

- Implement getNextString to break up std::string into words. stringstream
  just doesn't work on Android.
- string::find_last_of doesn't look for the last substring, but the
  last character from a given string.
- Use SIGTERM to terminate processes (this isn't necessary, but using
  SIGKILL is not a good practice).
- Convert "./rpc" to a full path. When a module is uploaded and offloaded
  to Hexagon, the dlopen on Hexagon needs an absolute path (or a path
  without directories).

* Only set the absolute patch on non-Windows platforms

Windows has different macros for the maximum path length.

4 years ago[Relay-TFLite] FP32 and Quantized Object Detection Model (#5479)
Animesh Jain [Fri, 8 May 2020 03:18:18 +0000 (20:18 -0700)]
[Relay-TFLite] FP32 and Quantized Object Detection Model (#5479)

* TFlite e2e FP32 Object detection model

* Fix test

* [Relay-TFLite] Quantized activations

* Flexbuffer parsing

* Lint

* Relaxing checks.

* Github reviews

* comments

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-212.us-west-2.compute.internal>
4 years ago[RUNTIME] Store nullptr PackedFunc as nullptr for better error propagation (#5540)
Tianqi Chen [Fri, 8 May 2020 03:10:58 +0000 (20:10 -0700)]
[RUNTIME] Store nullptr PackedFunc as nullptr for better error propagation (#5540)

4 years ago[Refactor][std::string --> String] IRModule is updated with String (#5523)
ANSHUMAN TRIPATHY [Thu, 7 May 2020 22:11:25 +0000 (03:41 +0530)]
[Refactor][std::string --> String] IRModule is updated with String (#5523)

* [std::string --> String] IRModule is updated with String

* [1] Packedfunction updated

* [2] Lint error fixed

* [3] Remove std::string variant

4 years ago[RPC][BUGFIX] Fix remote device sync (#5538)
Tianqi Chen [Thu, 7 May 2020 21:54:25 +0000 (14:54 -0700)]
[RPC][BUGFIX] Fix remote device sync (#5538)

4 years ago[RELAY][ONNX]ReduceLogSumExp Operator support (#5453)
Samuel [Thu, 7 May 2020 20:50:12 +0000 (02:20 +0530)]
[RELAY][ONNX]ReduceLogSumExp Operator support (#5453)

* [RELAY]LogSumExp Op Support

* [ONNX]LogSumExp Op Support

4 years ago[WEB][RUNTIME] TVM WebAssembly JS Runtime (#5506)
Tianqi Chen [Thu, 7 May 2020 20:47:36 +0000 (13:47 -0700)]
[WEB][RUNTIME] TVM WebAssembly JS Runtime (#5506)

* [WEB] Remove the old web runtime

* [WEB][RUNTIME] TVM WebAssembly Runtime

This PR introduces a brand new TVM web runtime based on the WASM standard API.
Main highlights:

- The new runtime is rewritten using the Typescript.
- The new runtime now directly interfaces with WebAssembly's standard API,
  instead of relying on emscripten's API.
  This change will make the js runtime more portable to runtime variants.
  For example, we could also try to make it interface with the tvm's rust runtime implementation.
- System library can be provided through WASI
  - We also build a hack to enable Emscripten to generate a WASI like
    bundle for runtime environment on the Web.
- The wasm generation now uses the mainlin LLVM.
- Dynamic link(dlopen) is not used due to limitation of wasm,
  instead we rely on the recent new RPC refactor to directly
  restart a new session for each wasm binary sent to the RPC.

* Address review comments

* Skip tensorcore test

4 years ago[Frontend][TFLite] ADD_N operator (#5474)
Mahesh Ambule [Thu, 7 May 2020 20:09:18 +0000 (01:39 +0530)]
[Frontend][TFLite] ADD_N operator  (#5474)

4 years agofix a few bugs with shape inference and types in the onnx importer (#5534)
Matthew Brookhart [Thu, 7 May 2020 20:03:52 +0000 (13:03 -0700)]
fix a few bugs with shape inference and types in the onnx importer (#5534)

4 years agoCache PrimExpr instead of raw pointers in bound analyzer (#5533)
Krzysztof Parzyszek [Thu, 7 May 2020 18:18:26 +0000 (13:18 -0500)]
Cache PrimExpr instead of raw pointers in bound analyzer (#5533)

The objects that the raw pointers point to can be deallocated and new
objects can be allocated at the same address, all while these pointers
are still in the cache. This can lead to unexpected behavior, for
example to calculated bound conflicts with previously cached values.

Caching PrimExpr will prevent the objects from being deallocated while
the cache is active.

4 years ago[TOPI][Winograd] Optimization of Conv2d Winograd algorithm on Tensor Core (#5485)
wsl-inspur [Thu, 7 May 2020 10:46:45 +0000 (18:46 +0800)]
[TOPI][Winograd] Optimization of Conv2d Winograd algorithm on Tensor Core (#5485)

4 years ago [FRONTEND][TFLite] Fully connected op conversion made in sync with TFLite (#5510)
ANSHUMAN TRIPATHY [Thu, 7 May 2020 10:36:20 +0000 (16:06 +0530)]
 [FRONTEND][TFLite] Fully connected op conversion made in sync with TFLite (#5510)

* [FRONTEND][TFLite] Fully connected op conversion made in sync with TFLite

* [1] Test case added

* [2] Review comments handled

* [3] Prints removed