platform/upstream/tvm.git
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

4 years ago[TFLITE]Select op support for tflite frontend (#5486)
Samuel [Thu, 7 May 2020 07:27:39 +0000 (12:57 +0530)]
[TFLITE]Select op support for tflite frontend (#5486)

* [TFLITE]Select/Where op support for tflite frontend

* Review comment fixed

* Review comment fixed

4 years agoFix an issue with Upsampling and update one test to hit the broken usecase (#5530)
Matthew Brookhart [Wed, 6 May 2020 19:36:01 +0000 (12:36 -0700)]
Fix an issue with Upsampling and update one test to hit the broken usecase (#5530)

4 years agoLRN only supports 4D tensors, remove it from alter_op_layout (#5520)
Matthew Brookhart [Wed, 6 May 2020 18:51:15 +0000 (11:51 -0700)]
LRN only supports 4D tensors, remove it from alter_op_layout (#5520)

4 years ago[RUNTIME] Improve PackedFunc robustness (#5517)
Tianqi Chen [Wed, 6 May 2020 18:50:09 +0000 (11:50 -0700)]
[RUNTIME] Improve PackedFunc robustness (#5517)

* [RUNTIME] Improve PackedFunc robustness

- Add static assert to warn about unsupported type deduction.
- Always inline template expansions for PackedFunc calls.

* Fix style issue

4 years ago[RPC] Fix the multihop cpu case (#5522)
Tianqi Chen [Wed, 6 May 2020 14:50:41 +0000 (07:50 -0700)]
[RPC] Fix the multihop cpu case (#5522)

4 years agofix prelu importer and add tests: (#5521)
Matthew Brookhart [Wed, 6 May 2020 03:53:07 +0000 (20:53 -0700)]
fix prelu importer and add tests: (#5521)

4 years ago[TFLITE]Nit: Function names made consitent (#5515)
Samuel [Tue, 5 May 2020 23:47:44 +0000 (05:17 +0530)]
[TFLITE]Nit: Function names made consitent (#5515)

4 years ago[PATCH] [ring_buffer.h] Improve commentary for RingBuffer (#5518)
Ramana Radhakrishnan [Tue, 5 May 2020 23:47:10 +0000 (00:47 +0100)]
[PATCH] [ring_buffer.h] Improve commentary for RingBuffer (#5518)

bytes_available refers to the number of bytes used in the ring
buffer. At the same time, fix a typo.

4 years ago[RPC][BUGFIX][BACKPORT-0.6] Fix bug in rpc ring buffer shrink (#5516)
Tianqi Chen [Tue, 5 May 2020 23:47:00 +0000 (16:47 -0700)]
[RPC][BUGFIX][BACKPORT-0.6] Fix bug in rpc ring buffer shrink (#5516)

4 years ago[QNN] Support CallNode inputs in qnn.concatenate (#5360)
mbaret [Tue, 5 May 2020 21:38:40 +0000 (22:38 +0100)]
[QNN] Support CallNode inputs in qnn.concatenate (#5360)

* [QNN] Support CallNode inputs in qnn.concatenate

Currently, qnn.concatenate assumes that its 1st arg
(data) is a TupleNode. This may not necessarily be true
if the input is a CallNode which returns a value of
tuple-type. This patch handles the CallNode case by
inserting TupleGetItemNodes.

* Fix lint

* Add test

Change-Id: I40b55517b8b1dabbeca89337f80c0c8e62e34981

* Use isinstance

Change-Id: I731a231113c5214528373ef52b603a9f05ec502a

* isinstance fix

Change-Id: Ib3495532f6e4feb5aae3d3096cedd4dc4676cdb4

* Use elif/else if

Change-Id: Id8123ea2dd9ce3d8267609de7b5602bb84b084fb

* Fix lint

Change-Id: Ib6899bb22260575aa3f5d8b51b5d2a0277ee2b10

* Lint fix

Change-Id: I56cf1930315344e42d956818a6c68e80836ae786

* Spaces

Change-Id: I3edab192e32bafa9ffdc915315791c63279d85dc

4 years ago[RPC] Call sync in remote cpu to gpu copies (#5512)
Tianqi Chen [Tue, 5 May 2020 19:07:59 +0000 (12:07 -0700)]
[RPC] Call sync in remote cpu to gpu copies (#5512)

4 years ago[REFACTOR][RPC][PROCOTOL-CHANGE] Modularize the RPC infra (#5484)
Tianqi Chen [Tue, 5 May 2020 00:05:33 +0000 (17:05 -0700)]
[REFACTOR][RPC][PROCOTOL-CHANGE] Modularize the RPC infra (#5484)

* Update dmlc-core which was mistakenly overriden

* [REFACTOR][RPC][PROCOTOL-CHANGE] Modularize the RPC infra.

This PR refactors the RPC protocol to make it more modularized.

- RPCSession: represent a set of features that need to be implemented
- RPCEndPont: End point that forwards the RPCSession requests over a communication channel.
- RPCModule: Exposes an RPCSession as an rpc device in the TVM Runtime API.

In the new design, the local machine is presented as a special case of RPCSession.
The remote is just another client session that calls into RPCEndPoint.
The RPC communication path is as follows.

```
client -> ClientSession -> EndPoint[client@n0]
-> networking[between n0 <=> n1]
-> EndPoint[server@n1] -> LocalSession[@n1]

```

Because of the new modular design, we can now chain more sessions together.
For example, we can now run the following proxy setup (testcase in test_runtime_rpc.test_session_constructor).

```
client -> ClientSession -> Endpoint[client@n0]
-> networking[between n0 <=> n1]
-> Endpoint[server@n1] -> ClientSession -> Endpoint[client@n1]
-> networking[between n1 <=> n2]
-> Endpoint[server@n2] -> LocalSession[@n2]
```

We can also implement other types of Sessions.
As an example, We introduced a PopenSession that communicates with
the another process via a pipe.

We also add more comments about the internal of the RPC.
The communication protocol is simplfied using a similar convention as PackedFunc.
This allows us to further reduce the amount of special remote syscalls.

Due to the major improvement and simplification, we are making a non-compatible update to the RPC protocol.
It means that the client and server needs to be upgraded to together in order for it to function correctly.

This PR also introduces a versioning mechanism to the current RPC procotol,
so that future upgrade will be produce more user friendly with error messages.

* Address review comments

* Remove ld library path

4 years ago[RUST][RUNTIME] Fix workspace (#5503)
MORITA Kazutaka [Mon, 4 May 2020 20:51:36 +0000 (05:51 +0900)]
[RUST][RUNTIME] Fix workspace (#5503)

* [RUST][RUNTIME] Fix workspace

* use ok_or_else instead of ok_or

4 years agoFix Canonical Simplifier (#5505)
Yao Wang [Mon, 4 May 2020 15:26:17 +0000 (08:26 -0700)]
Fix Canonical Simplifier (#5505)

4 years agobump tophub rocm version (#5504)
Thomas Viehmann [Sun, 3 May 2020 15:34:14 +0000 (17:34 +0200)]
bump tophub rocm version (#5504)

4 years ago[uTVM] Reset target and wait for runtime initialization on connect. (#5499)
Andrew Reusch [Sat, 2 May 2020 17:52:40 +0000 (10:52 -0700)]
[uTVM] Reset target and wait for runtime initialization on connect. (#5499)

* This ensures a clean runtime environment for tuning and evaluating
   tasks.
 * This patch assumes that the code flashed to target executes the ARM
   BKPT or RISC-V EBREAK instructions after startup.

4 years ago[Rust] Fixes for wasm32 target (#5489)
MORITA Kazutaka [Sat, 2 May 2020 00:06:43 +0000 (09:06 +0900)]
[Rust] Fixes for wasm32 target (#5489)

* [Rust] Fixes for wasm32 target

* [Rust] Add test for wasm32

* allow cargo config to be into repo

* Disable wasm tests in CI

4 years ago[TFLite] Model importer to be compatible with tflite 2.1.0 (#5497)
Thierry Moreau [Sat, 2 May 2020 00:02:24 +0000 (17:02 -0700)]
[TFLite] Model importer to be compatible with tflite 2.1.0 (#5497)

4 years agoLink necessary libraries when building runtime for Android (#5496)
Krzysztof Parzyszek [Fri, 1 May 2020 20:55:34 +0000 (15:55 -0500)]
Link necessary libraries when building runtime for Android (#5496)

- Link libgcc to enable use of thread-local storage (ThreadLocalStore
  requires emutls).
- Link liblog when building with Hexagon support.

4 years ago[REFACTOR][BOYC] Non recursive partitioning (#5493)
Zhi [Fri, 1 May 2020 20:27:44 +0000 (13:27 -0700)]
[REFACTOR][BOYC] Non recursive partitioning (#5493)

* non recursive partitioning

* refactor maps

* rebase upstream

* refactor shared output

* address comments

Co-authored-by: Cody Yu <comaniac0422@gmail.com>
4 years ago[MXNET]broadcast and logical op support (#5461)
Samuel [Fri, 1 May 2020 13:03:45 +0000 (18:33 +0530)]
[MXNET]broadcast and logical op support (#5461)

* [MXNET]broadcast and logical op support

* Review comment fixed

4 years ago[Hexagon] Change "scalar" and "stack" in IDL from "inrout" to "in" (#5487)
Krzysztof Parzyszek [Fri, 1 May 2020 08:43:22 +0000 (03:43 -0500)]
[Hexagon] Change "scalar" and "stack" in IDL from "inrout" to "in" (#5487)

Co-authored-by: Abhikrant Sharma <quic_abhikran@quicinc.com>
4 years agoMake "none" DataType explicit (#5491)
Krzysztof Parzyszek [Fri, 1 May 2020 05:06:06 +0000 (00:06 -0500)]
Make "none" DataType explicit (#5491)

* Make "none" DataType explicit

The None data type is created when converting an empty string to DataType.
Add functions to create it and recognize it. Convert it to the "void" LLVM
type in LLVM codegen.

* Rename "none" to "void"

* Map VoidType:Type -> Void:DataType in GetRuntimeDataType

* Map Void:DataType -> VoidType:Type in GetType

4 years ago[IR] Initial stab at std::string->String upgrade (#5438)
Tianqi Chen [Thu, 30 Apr 2020 23:11:38 +0000 (16:11 -0700)]
[IR] Initial stab at std::string->String upgrade (#5438)

4 years agoRemoving older Object detection TFlite test (#5477)
Animesh Jain [Thu, 30 Apr 2020 19:21:27 +0000 (12:21 -0700)]
Removing older Object detection TFlite test (#5477)

4 years ago[RUNTIME][uTVM] AutoTVM + uTVM for Cortex-M7 (#5417)
Andrew Reusch [Thu, 30 Apr 2020 17:59:33 +0000 (10:59 -0700)]
[RUNTIME][uTVM] AutoTVM + uTVM for Cortex-M7 (#5417)

* Prototype for micro TVM.

* Cleanup and sync micro tvm prototype.

* Use /std:c++14 with MSVC.

 * Per tqchen: project has already moved to C++14
 * Presubmit failed for code that built locally on gcc.

* fix ASF lint, and fix add_asf_header too

* Compiles with USE_MICRO=OFF.

* Cleanup TargetPtr and word size representations.

* fix compile warning

* address logan's comments

* address logan and liangfu comments

* address thierry's comments

* address u99127, liangfu, tmoreau89 comments

Co-authored-by: Logan Weber <weberlo@cs.washington.edu>
4 years ago[Fix] Add ConstantNode to IsAtomic (#5457)
Zhi [Thu, 30 Apr 2020 17:00:27 +0000 (10:00 -0700)]
[Fix] Add ConstantNode to IsAtomic (#5457)

* add constantnode to atomic

* Add ToANormalForm to FoldConstant

4 years ago[VTA] Fix VTA compile issue (#5481)
Hua Jiang [Thu, 30 Apr 2020 15:07:23 +0000 (08:07 -0700)]
[VTA] Fix VTA compile issue (#5481)

* [VTA] Fix Pynq driver build issue.
Issue:
When doing vta compile in xilinx FPGA, the pynqdriver.cc report can
not find <vta/driver.h>

Solution:
add related path.

* Fix libvta load fail issue.

issue:
run vta on pynq board libvta.so load failed.

solution:
fixed VTA.make logic issue

4 years ago[RUNTIME] Improved Packed FFI for optional. (#5478)
Tianqi Chen [Thu, 30 Apr 2020 15:07:00 +0000 (08:07 -0700)]
[RUNTIME] Improved Packed FFI for optional. (#5478)

Allows Optional<NDArray> and module to be passed with the right type code.

4 years ago[team] add reviewer kparzysz-quic (#5482)
Yizhi Liu [Thu, 30 Apr 2020 15:06:41 +0000 (08:06 -0700)]
[team] add reviewer kparzysz-quic (#5482)

4 years ago[FRONTEND][TFLITE]Logical not op support (#5475)
Samuel [Thu, 30 Apr 2020 08:07:49 +0000 (13:37 +0530)]
[FRONTEND][TFLITE]Logical not op support (#5475)

4 years ago[intrin] a few more math functions (#5468)
Bing Xu [Thu, 30 Apr 2020 04:07:18 +0000 (21:07 -0700)]
[intrin] a few more math functions (#5468)

4 years ago[VTA][Runtime] clear sram index in reset (#5470)
ZHANG Hao [Thu, 30 Apr 2020 00:54:57 +0000 (08:54 +0800)]
[VTA][Runtime] clear sram index in reset (#5470)

Co-authored-by: Zhang Hao <zhanghao@4paradigm.com>
4 years ago[BYOC] Bind constant tuples in graph partitioner (#5476)
mbaret [Wed, 29 Apr 2020 18:23:15 +0000 (19:23 +0100)]
[BYOC] Bind constant tuples in graph partitioner (#5476)

* Bind constant tuples in the graph partitioner

Change-Id: I815b32b5445a536c1837369b04f67dbbb0aed900

* Add partitioning test

Change-Id: I3a492ec8d1beab4830214e3bc8da2a7c80771ca4

* Rename test target

Change-Id: Ie32f37c1395ff597c0047ad3a93ed04ce3f3125d

4 years ago[CI] update ci-gpu to the latest (#5469)
Tianqi Chen [Wed, 29 Apr 2020 17:45:26 +0000 (10:45 -0700)]
[CI] update ci-gpu to the latest (#5469)

4 years ago[CODEGEN][CUDA] Fix a bug when vectorized load&store was involved for… (#5428)
boh_inspur [Wed, 29 Apr 2020 17:22:25 +0000 (12:22 -0500)]
[CODEGEN][CUDA] Fix a bug when vectorized load&store was involved for… (#5428)

* [CODEGEN][CUDA] Fix a bug when vectorized load&store was involved for "char2"

* Add unittest for char2

* vector element load support char2&add some unittest for vector element load

* Merge common up logic&Support char3&Add unittest for char3

4 years ago[TFLITE] Match TFLite shape for SSD custom op (#5473)
mbaret [Wed, 29 Apr 2020 16:13:16 +0000 (17:13 +0100)]
[TFLITE] Match TFLite shape for SSD custom op (#5473)

This patch ensures that the output shape from TVM's
Detection_PostProcess is the same as TFLite's and
expands the unit test to confirm this.

Change-Id: If5db95741533f131241dfebbaa7708dbd528fe70

4 years ago[Frontend][TFLite] support for FILL and SPLIT_V operators (#5330)
Mahesh Ambule [Wed, 29 Apr 2020 10:51:57 +0000 (16:21 +0530)]
[Frontend][TFLite] support for FILL and SPLIT_V operators (#5330)

* tflite spliv ops

* TFLITE fill and splitv ops

* TFLITE fill and splitv ops

* TFLITE fill and splitv ops

* remove unnecessary operator check

4 years ago[Frontend][TFLite] L2_POOL_2D operator (#5452)
Mahesh Ambule [Wed, 29 Apr 2020 05:35:54 +0000 (11:05 +0530)]
[Frontend][TFLite] L2_POOL_2D operator (#5452)

* TFLITE fill and splitv ops

* l2_pool_2d op changes in comment

* TFLite l2_pool_2d op added test case in main

* TFLite L2_POOL_2D added check for quantized input

4 years ago[COMMUNITY] @liangfu -> committer (#5460)
Thierry Moreau [Wed, 29 Apr 2020 05:06:30 +0000 (22:06 -0700)]
[COMMUNITY] @liangfu -> committer (#5460)

4 years agoImprove Docker cache reuse by pointing to the current version of the image, (#5466)
Leandro Nunes [Tue, 28 Apr 2020 23:32:38 +0000 (00:32 +0100)]
Improve Docker cache reuse by pointing to the current version of the image, (#5466)

on top of another image to be used as reference.

4 years ago[Topi][Cuda]Optimizations of global_ave_pool for NHWC layout (#5450)
SXM-inspur [Tue, 28 Apr 2020 20:44:03 +0000 (04:44 +0800)]
[Topi][Cuda]Optimizations of global_ave_pool for NHWC layout (#5450)

* Optimizations of global_ave_pool for NHWC layout

* Optimize the code format to pass inspection of pylint

Co-authored-by: Shawn-Inspur <wushaohua@inspur.com>
4 years agoAdd RoiAlign to Onnx frontend (#5454)
Matthew Brookhart [Tue, 28 Apr 2020 01:20:23 +0000 (18:20 -0700)]
Add RoiAlign to Onnx frontend (#5454)

4 years ago[TFLite Runtime] Add TFLite Runtime dependencies to CI CPU docker build (#5437)
Michal Piszczek [Mon, 27 Apr 2020 15:14:33 +0000 (08:14 -0700)]
[TFLite Runtime] Add TFLite Runtime dependencies to CI CPU docker build (#5437)

4 years ago[Pytorch] fix translation of transpose when axis argument is as a list (#5451)
Nikolay Nez [Mon, 27 Apr 2020 11:34:58 +0000 (20:34 +0900)]
[Pytorch] fix translation of transpose when axis argument is as a list (#5451)

4 years ago[relay][topi] Add operation relay.nn.dilate() which calls topi.nn.dilate() (#5331)
notoraptor [Mon, 27 Apr 2020 07:36:35 +0000 (03:36 -0400)]
[relay][topi] Add operation relay.nn.dilate() which calls topi.nn.dilate() (#5331)

* Add operation relay.nn.dilate() which calls topi.nn.dilate().

* Fix typo

* Set op pattern to injective

4 years ago[ONNX]GatherNd, Round, IsNaN, IsInf (#5445)
Samuel [Mon, 27 Apr 2020 06:53:10 +0000 (12:23 +0530)]
[ONNX]GatherNd, Round, IsNaN, IsInf (#5445)

4 years agoImprove IntervalSet's floormod (#5367)
yongfeng-nv [Mon, 27 Apr 2020 00:00:52 +0000 (20:00 -0400)]
Improve IntervalSet's floormod (#5367)

4 years ago[Docs] VTA install doc migration from md to rst (#5442)
Thierry Moreau [Sun, 26 Apr 2020 23:49:05 +0000 (16:49 -0700)]
[Docs] VTA install doc migration from md to rst (#5442)

4 years ago[KERAS]Embedding layer (#5444)
Samuel [Sun, 26 Apr 2020 02:58:02 +0000 (08:28 +0530)]
[KERAS]Embedding layer (#5444)

4 years ago[RELAY] Move frontend utils (#5345)
mbaret [Sat, 25 Apr 2020 16:18:30 +0000 (17:18 +0100)]
[RELAY] Move frontend utils (#5345)

* [RELAY] Move frontend utils

The util file currently under frontend is used from
outside of frontend (in qnn/op/legalizations). This suggests
that the file should be pushed up to a higher level.

The benefit from this change is that importing qnn no longer
also imports all the frontends.

* Inline get_scalar_from_constant

Change-Id: I1cc64e9ecb0eadb6ac0f7b62e6ea174644af4ad4

* Remove util.py from Relay

Change-Id: If9cd7cf3fc0bd1861a3a9b5604f338e084d8db96

* Shorten functions

Change-Id: Ieb537d82e6ee52421ff05a90cd00a03679ffebf2

* Line length

Change-Id: I1d216b7e73a060c4f118f5da50ce58b18eba907f

4 years ago[CodeGen] Cleanup generated code (#5424)
Wei Pan [Sat, 25 Apr 2020 08:20:27 +0000 (01:20 -0700)]
[CodeGen] Cleanup generated code (#5424)

- remove unnecessary white spaces from storage kind
- do not start a new scope for vectorization as temporary
  variables are alll uniquely generated.

The above two changes make vectorized code much cleaner.

Signed-off-by: Wei Pan <weip@nvidia.com>
4 years agoAdd TopK to ONNX Frontend (#5441)
Matthew Brookhart [Sat, 25 Apr 2020 06:37:09 +0000 (23:37 -0700)]
Add TopK to ONNX Frontend (#5441)

* Add TopK to ONNX Frontend

* respond to review comments

4 years agofix miopen pad (#5433)
Thomas Viehmann [Sat, 25 Apr 2020 01:32:18 +0000 (03:32 +0200)]
fix miopen pad (#5433)

4 years ago[PYTORCH]Rsub, Embedded, OneHot ops support (#5434)
Samuel [Sat, 25 Apr 2020 01:23:35 +0000 (06:53 +0530)]
[PYTORCH]Rsub, Embedded, OneHot ops support (#5434)

4 years ago[RELAY][PYTORCH]cosh,sinh,log2,log10,log1p op support (#5395)
Samuel [Sat, 25 Apr 2020 01:22:10 +0000 (06:52 +0530)]
[RELAY][PYTORCH]cosh,sinh,log2,log10,log1p op support (#5395)

* [RELAY][PYTORCH]cosh,sinh,log2,log10,log1p op support

* Review comment fixed

* Gradient testcase added

4 years ago[RUNTIME][OBJECT] Introduce static slots for common objects. (#5423)
Tianqi Chen [Fri, 24 Apr 2020 19:49:05 +0000 (12:49 -0700)]
[RUNTIME][OBJECT] Introduce static slots for common objects. (#5423)

The _type_child_slots can be used to enable quick type checking optimization
by checking the whether the type index is within the bound.

This PR enables these static slots:

- Introduce a static assert to avoid the scenario when a developer forget to
  _type_child_slots when the field is set for the type's parent.
- Revamp and assign static type index to common runtime objects
- Add a DumpTypeTable call to allow developer monitor the current situation
  of type table and offers suggestions for the slots(ideally the slots equals
  the number of children so there is no overflow.

4 years agoCorrected TVM autotuning on GPU (#5432)
JishinMaster [Fri, 24 Apr 2020 16:50:01 +0000 (18:50 +0200)]
Corrected TVM autotuning on GPU (#5432)

Added missing "tir" in tvm.tir.analysis.verify_gpu_code(f, kwargs)

4 years agomisc fixes for ROCm (pointer lifetime, runtime::String refactor) (#5431)
Thomas Viehmann [Fri, 24 Apr 2020 15:56:52 +0000 (17:56 +0200)]
misc fixes for ROCm (pointer lifetime, runtime::String refactor) (#5431)

4 years ago[FRONTEND][TFLITE]Gather, StridedSlice op support added (#4788)
Samuel [Fri, 24 Apr 2020 10:53:38 +0000 (16:23 +0530)]
[FRONTEND][TFLITE]Gather, StridedSlice op support added (#4788)

* [FRONTEND][TFLITE]Gather, StridedSlice op added

* Review comments fixed

4 years ago[PYTORCH]where, addcdiv, addcmul op support (#5383)
Samuel [Fri, 24 Apr 2020 10:49:26 +0000 (16:19 +0530)]
[PYTORCH]where, addcdiv, addcmul op support (#5383)

* [PYTORCH]Where, addcdiv, addcmul op support

* Review comments fixed

4 years ago[PY][FFI] Introduce PyNativeObject, enable runtime.String to subclass str (#5426)
Tianqi Chen [Fri, 24 Apr 2020 05:06:05 +0000 (22:06 -0700)]
[PY][FFI] Introduce PyNativeObject, enable runtime.String to subclass str (#5426)

To make runtime.String to work as naturally as possible in the python side,
we make it sub-class the python's str object. Note that however, we cannot
sub-class Object at the same time due to python's type layout constraint.

We introduce a PyNativeObject class to handle this kind of object sub-classing
and updated the FFI to handle PyNativeObject classes.

4 years ago[FRONTEND][MXNET] support elemwise logic ops (#5361)
MORITA Kazutaka [Fri, 24 Apr 2020 02:54:26 +0000 (11:54 +0900)]
[FRONTEND][MXNET] support elemwise logic ops (#5361)

4 years agoAdd option to specify flatbuffers location (#5425)
Michal Piszczek [Thu, 23 Apr 2020 23:25:46 +0000 (16:25 -0700)]
Add option to specify flatbuffers location (#5425)

4 years ago[MXNET]DepthToSpace & SpaceToDepth Operator (#5408)
Samuel [Thu, 23 Apr 2020 22:05:25 +0000 (03:35 +0530)]
[MXNET]DepthToSpace & SpaceToDepth Operator (#5408)

4 years ago[RFC] Pytest environment improvements (#5421)
Ramana Radhakrishnan [Thu, 23 Apr 2020 22:05:03 +0000 (23:05 +0100)]
[RFC] Pytest environment improvements (#5421)

* [RFC] Pass pytest options globally.

In many places having a global pytest flag is useful . For me with the
build and test of tvm , I would like to be able to globally pass in
pytest options as part of development flow or CI flows where one would
like to measure other things regularly that need measurements including
pytest coverage data that I would like to experiment with across the stack.

This has been achieved with an additional setup-pytest-env.sh file in
tests/scripts rather than putting in something in every single task test
script and something I would like to avoid.

This now means the -v option to pytest is superfluous. I did consider
having a pytest.ini file but that doesn't allow me to pass any old
environment variable in and this seems to be the compromise.

* Improve other use case documentation

* Rationalize pytest environment.

* Remove the setting from docker/with_same_user.
* Take the opportunity to migrate common PYTHONPATH and
TVM_PATH into the common environment setting.

* Fixup vta fsim

* Be more explicit with common PYTHONPATH

* Fix python path for task_python_vta_fsim.sh properly

* Fix nit in documentation.

4 years ago[BYOC] Use Non-Recursive Visitor/Mutator (#5410)
Cody Yu [Thu, 23 Apr 2020 20:56:43 +0000 (13:56 -0700)]
[BYOC] Use Non-Recursive Visitor/Mutator (#5410)

* Non-Recursive AnnotatedTarget and MergeAnnotation

* Non-Recursive AnnotatedRegionSet and RegionMerger

4 years ago[DOCS] Migrate some markdowns to rst, fix sphinx3 warnings (#5416)
Tianqi Chen [Thu, 23 Apr 2020 19:40:11 +0000 (12:40 -0700)]
[DOCS] Migrate some markdowns to rst, fix sphinx3 warnings (#5416)

* [DOCS] Migrate some markdowns to rst, fix sphinx3 warnings

* Add note block

4 years ago[CI] Migrate Tensorflow and Tensorflow lite in CI to 2.1.0 (#5392)
Ramana Radhakrishnan [Thu, 23 Apr 2020 19:13:42 +0000 (20:13 +0100)]
[CI] Migrate Tensorflow and Tensorflow lite in CI to  2.1.0 (#5392)

* Migrate Tensorflow and TFLite in the CI up to 1.15.2

The latest stable version of Tensorflow and Tensorflow lite
in the 1.x series is 1.15.2. The tflite frontend is receiving
support for versions of tflite > 1.14 but there is no consistent
testing.

There are 2 failures already in the source base with tf 1.15
and I'm concerned this will just get exacerbated over time
if we don't have CI picking this up and I view this as a stepping
stone towards stepping CI to TF2.x.

The test failures that I have commented will get issues raised
for them as issues to be fixed.

* Comment out run of qnn_mobilenet_v3_net

This is another test that fails with TFlite 1.15.2

* Skip the qnn_mobilenet_v3 test in the pytest fashion.

* Switch docker versions to support Tensorflow 2.1.0

* Fix up pytest imports and usage.

* Skip these tests currently for Tensorflow 2.1.0

4 years ago[cuDNN] Add cuDNN grouped convolutions support (#5319)
Wei Pan [Thu, 23 Apr 2020 18:59:03 +0000 (11:59 -0700)]
[cuDNN] Add cuDNN grouped convolutions support (#5319)

Signed-off-by: Wei Pan <weip@nvidia.com>
4 years ago[Frontend] Asymmetric padding of convolution support (#4803)
Zhao Wu [Thu, 23 Apr 2020 17:10:02 +0000 (01:10 +0800)]
[Frontend] Asymmetric padding of convolution support (#4803)

4 years agofix [RUNTIME][VULKAN] vkBuffer released before memory copy command send to GPU (...
samwyi [Thu, 23 Apr 2020 15:05:42 +0000 (08:05 -0700)]
fix [RUNTIME][VULKAN] vkBuffer released before memory copy command send to GPU (#5388) (#5418)

4 years ago[DOCS] Migrate HLS documents from md to rst (#5419)
MORITA Kazutaka [Thu, 23 Apr 2020 15:05:08 +0000 (00:05 +0900)]
[DOCS] Migrate HLS documents from md to rst (#5419)

4 years ago[RUNTIME][CONTRIB] CoreML Runtime (#5283)
MORITA Kazutaka [Thu, 23 Apr 2020 07:35:43 +0000 (16:35 +0900)]
[RUNTIME][CONTRIB] CoreML Runtime (#5283)

* [RUNTIME][CONTRIB] CoreML Runtime

* fix lint

* fix CI

* use xcrun to compile coreml model