Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull #5

Merged
merged 77 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1ed28ae
[NNVM] Enhance operator fusion for more element wise patterns (#1548)
masahi Aug 8, 2018
60da470
add tvm external registry entrypoint (#1562)
souptc Aug 8, 2018
7ea06e6
[ONNX]onnx gather bug fix (#1543)
siju-samuel Aug 8, 2018
c9f9a3f
l2normalization operator support for tensorflow (#1528)
siju-samuel Aug 8, 2018
53d2431
Separate fusion and Compilation (#1564)
zhiics Aug 8, 2018
85483c3
[TOPI] add injective scheduler for HLS backends (#1553)
kazum Aug 9, 2018
41d4dd6
Use int for int8x4 due to performance overhead of char4 (#1569)
vinx13 Aug 9, 2018
6d4cf44
[DOCS] Neural network Deployment Guide with System Module Mode #1523 …
srkreddy1238 Aug 9, 2018
672147c
add conv2d transpose and fix bugs (#1566)
merrymercy Aug 9, 2018
764516a
[TEST] force openblas threads to be 1 (#1580)
tqchen Aug 9, 2018
2afe024
Vulkan TVM Android Support (#1571)
Dayananda-V Aug 10, 2018
48fc410
[TEAM] merrymercy->code owner (#1581)
tqchen Aug 10, 2018
48ff777
[AUTOTVM] API change (#1583)
merrymercy Aug 10, 2018
b0368e3
update dmlc-core for security reason (#1584)
haojin2 Aug 10, 2018
f52255b
DLPack Conversion API (#1573)
eqy Aug 10, 2018
edda6cc
use phone EditText for numerical fields (#1587)
eqy Aug 11, 2018
ec3f09b
[RUNTIME] Refactor to enable stackvm in runtime. (#1588)
tqchen Aug 11, 2018
19cf5c6
[DLPACK] Enable cython support (#1589)
tqchen Aug 11, 2018
60769b7
Fixed bugs for SSD sorting and multbox detection (#1578)
Laurawly Aug 13, 2018
81b42bc
Split_indices negative axis added (#1595)
PariksheetPinjari909 Aug 13, 2018
84296f9
[FRONTEND][TENSORFLOW] Optimized tensorflow testcases (#1546)
Aug 13, 2018
daa2569
[NNVM][DOC] Update NNVM symbol documentation to latest. Ref. 1591 (#1…
srkreddy1238 Aug 14, 2018
bc7431b
[NNVM][POOL] bug fix. Remove the hardcode. (#1600)
srkreddy1238 Aug 14, 2018
54a115e
[FRONTEND][DARKNET]LSTM and GRU support (#1576)
siju-samuel Aug 14, 2018
7751a6b
[AUTOTVM] Fix GATuner and improve error message (#1605)
merrymercy Aug 15, 2018
a80356b
[NNVM] Add symbol for inception v3 (#1604)
merrymercy Aug 15, 2018
9bcc317
[TEAM] New reviewer: kevinthesun (#1606)
tqchen Aug 16, 2018
11dd933
[RUNTIME] Enable return NDArray in RPC (#1610)
tqchen Aug 16, 2018
093dc74
[NNVM] Add ONNX upsample converter (#1591)
Jokeren Aug 16, 2018
e282915
add -mattr=+neon for all arm cpu target (#1612)
merrymercy Aug 16, 2018
acc2151
fix output_shape in conv2d_nchw (#1613)
ashokei Aug 17, 2018
6cd5a8f
[NNVM] Bug fix Prevent fusing convolution with injective op (#1608)
masahi Aug 17, 2018
9b0e499
[NNVM] TF: Add Pack operation (#1570)
sergei-mironov Aug 18, 2018
38d0835
#1592 [PASS] Fix missing mem CHECK in storage_rewrite (#1616)
xqdan Aug 18, 2018
a5f2759
[FRONTEND][COREML]MultiplyLayerParams L2NormalizeLayerParams and Upsa…
siju-samuel Aug 18, 2018
1c66012
fix import (#1621)
merrymercy Aug 20, 2018
b00aabc
Add missing check when deciding conv op and injective op are in the s…
masahi Aug 20, 2018
20c495e
[NODEREF] Introduce named attribute system. (#1618)
tqchen Aug 20, 2018
4dc21bd
[NNVM][DARKNET]Yolo and Upsample frontend support (#1501)
PariksheetPinjari909 Aug 20, 2018
5d533ec
Improve x86 Inception (#1506)
kevinthesun Aug 20, 2018
7cb85d8
[VERSION] Update to 0.5.dev (#1623)
tqchen Aug 20, 2018
21e1301
Add int8 gemm recipe (#1614)
vinx13 Aug 21, 2018
16d3c1f
[RUNTIME] Add TypedPackedFunc (#1626)
tqchen Aug 21, 2018
729224b
check in (#1629)
eqy Aug 22, 2018
b7beb1e
[AUTOTVM] Allow fallback for template & Fix bugs in tuners (#1615)
merrymercy Aug 22, 2018
ca76810
[TOPI][ARM CPU] fuse bias to depthwise conv2d (#1631)
merrymercy Aug 22, 2018
d060e91
[FRONTEND]minor bug fixes (#1632)
siju-samuel Aug 22, 2018
b11f2a0
[ATTRS] change AttrFiledInfo->Node (#1634)
tqchen Aug 22, 2018
d90c1e4
[NNVM][KERAS] Add cropping support (#1636)
kazum Aug 22, 2018
58b2395
[NNVM][KERAS] Fixed padding in pooling (#1635)
kazum Aug 22, 2018
0003856
[TEAM] New reviewer: nishi-t (#1637)
tqchen Aug 23, 2018
c98ba60
[FRONTEND][COREML]More ops are added (#1619)
siju-samuel Aug 23, 2018
56c50d2
trigger ci (#1620)
merrymercy Aug 23, 2018
cfafd21
[AUTOTVM] Simplify TopHub (#1630)
merrymercy Aug 23, 2018
b95b595
Remove leading "./" from include paths (#1640)
kazum Aug 23, 2018
56ab0ad
[RUNTIME][PYTHON] Switch to use __new__ for constructing node. (#1644)
tqchen Aug 23, 2018
7afe6ba
fix CO CI problem (#1641)
merrymercy Aug 23, 2018
3dbc0d6
[RUNTIME] [OPENCL] Fix access modifiers (#1643)
imorinaga Aug 23, 2018
e336544
[FIX] Fix issue with TypedPackedFunc template instatition (#1649)
jroesch Aug 23, 2018
62d34ca
[NNVM][KERAS] Support multiple outputs (#1648)
kazum Aug 23, 2018
6eecec9
[PYTHON] Enable constructors in Node (#1647)
tqchen Aug 23, 2018
0edf87e
[NNVM][TEST] Test against numerical grad (#1505)
sgrechanik-h Aug 23, 2018
771d895
[AUTOTVM] Fix local executor (#1651)
merrymercy Aug 24, 2018
531efd6
[NODE] Enable global singleton object, allow set_body_typed in functi…
tqchen Aug 24, 2018
a168899
improve text summary (#1655)
merrymercy Aug 24, 2018
cfc848a
[LANG] Improve serializer (#1658)
tqchen Aug 25, 2018
37988ad
[RUNTIME][OPENCL] delay device check (#1657)
kazum Aug 25, 2018
a03c60b
[CODEGEN][AOCL] Add math intrinsic rules (#1653)
kazum Aug 25, 2018
a9e0567
[FRONTEND][ONNX]HardSigmoid, min, max, mean ops support (#1645)
siju-samuel Aug 26, 2018
463e5c3
[FRONTEND][TENSORFLOW] fix the convertion of sum and add testcase for…
nishi-t Aug 27, 2018
1d7c52f
add docstring skip in hybrid script (#1668)
were Aug 27, 2018
ea01417
[DOCS][NNVM] Delete duplicated tensor operators from list (#1669)
imorinaga Aug 28, 2018
38203a8
Fix incorrect stride in conv2d_nhwc_python (#1670)
vinx13 Aug 28, 2018
12839e6
[AUTOTVM] Decouple build and run in measurement (#1661)
merrymercy Aug 29, 2018
7c4dd0b
[TOPI] add nn schedulers for HLS backends (#1663)
kazum Aug 29, 2018
9f99a4f
Fix incorrect doc in conv2d_nhwc_python (#1677)
vinx13 Aug 30, 2018
0c52378
[PASS] Enhance gpu verify pass (#1660)
merrymercy Aug 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tvm_option(USE_ROCM "Build with ROCM" OFF)
tvm_option(ROCM_PATH "The path to rocm" /opt/rocm)
tvm_option(USE_RPC "Build with RPC" ON)
tvm_option(USE_LLVM "Build with LLVM, can be set to specific llvm-config path" OFF)
tvm_option(USE_STACKVM_RUNTIME "Include stackvm into the runtime" OFF)
tvm_option(USE_GRAPH_RUNTIME "Build with tiny graph runtime" ON)
tvm_option(USE_GRAPH_RUNTIME_DEBUG "Build with tiny graph runtime debug mode" OFF)
tvm_option(USE_RTTI "Build with RTTI" ON)
Expand Down Expand Up @@ -97,7 +98,6 @@ file(GLOB COMPILER_SRCS
src/arithmetic/*.cc
src/autotvm/*.cc
src/codegen/*.cc
src/codegen/stack_vm/*.cc
src/lang/*.cc
src/pass/*.cc
src/op/*.cc
Expand Down Expand Up @@ -135,6 +135,16 @@ if(USE_RPC)
list(APPEND RUNTIME_SRCS ${RUNTIME_RPC_SRCS})
endif(USE_RPC)

file(GLOB STACKVM_RUNTIME_SRCS src/runtime/stackvm/*.cc)
file(GLOB STACKVM_CODEGEN_SRCS src/codegen/stackvm/*.cc)
list(APPEND COMPILER_SRCS ${STACKVM_CODEGEN_SRCS})
if(USE_STACKVM_RUNTIME)
message(STATUS "Build with stackvm support in runtime...")
list(APPEND RUNTIME_SRCS ${STACKVM_RUNTIME_SRCS})
else()
list(APPEND COMPILER_SRCS ${STACKVM_RUNTIME_SRCS})
endif(USE_STACKVM_RUNTIME)

if(USE_GRAPH_RUNTIME)
message(STATUS "Build with Graph runtime support...")
file(GLOB RUNTIME_GRAPH_SRCS src/runtime/graph/*.cc)
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,24 @@ See the [community structure document](http://docs.tvm.ai/contribute/community.h
- [Yuwei Hu](https://github.com/Huyuwei) TOPI
- [Zhixun Tan](https://github.com/phisiart) OpenGL/WebGL backend
- [Nick Hynes](https://github.com/nhynes) SGX and secured computing
- [Lianmin Zheng](https://github.com/merrymercy) AutoTVM

## Reviewers
- [Masahiro Masuda](https://github.com/masahi)
- [Kazutaka Morita](https://github.com/kazum)
- [Tatsuya Nishiyama](https://github.com/nishi-t)
- [Pariksheet Pinjari](https://github.com/PariksheetPinjari909)
- [Siva](https://github.com/srkreddy1238)
- [Alex Weaver](https://github.com/alex-weaver)
- [Yao Wang](https://github.com/kevinthesun)
- [Eddie Yan](https://github.com/eqy)
- [Joshua Z. Zhang](https://github.com/zhreshold)
- [Lianmin Zheng](https://github.com/merrymercy)

## List of Contributors
- [Full List of Contributors](https://github.com/dmlc/tvm/graphs/contributors)
- To contributors: please add your name to the list.
- [Qiao Zhang](https://github.com/zhangqiaorjc)
- [Jian Weng](https://github.com/were)
- [Masahiro Masuda](https://github.com/masahi)
- [Haolong Zhang](https://github.com/haolongzhangm)
- [Cody Hao Yu](https://github.com/comaniac)
- [Chris Nuernberger](https://github.com/cnuernber)
- [Tatsuya Nishiyama](https://github.com/nishi-t)
- [Kazutaka Morita](https://github.com/kazum)
2 changes: 1 addition & 1 deletion HalideIR
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ stage('Build') {
echo set\\(USE_RPC ON\\) >> config.cmake
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_GRAPH_RUNTIME ON\\) >> config.cmake
echo set\\(USE_STACKVM_RUNTIME ON\\) >> config.cmake
echo set\\(USE_BLAS openblas\\) >> config.cmake
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
Expand Down
63 changes: 63 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,69 @@ Refer to the Roadmap issue for complete list on on-going version features.
If you check in something that is not reflected in Roadmap issue, please reply
to that issue so it can get added.

## 0.4

This release features several major improvements. The high-level graph optimizer is now part of TVM repo. Some of the highlights are: Initial support of AutoTVM for automated optimization; customized accelerator backend VTA.

- Tensor operator primitives
- Introduce attrs field to operator primitives(e.g. compute) to store additional metadata, the attrs can be used as hint for scheduling
- Enable embedding of asm micro-kernels
- Hybrid python programming model
- python AST based IR builder interface
- support GPU programs
- AutoTVM, Automated tuning, and scheduling
- basic autotvm infra
- GPU IR verifier
- basic autotuning tutorial
- topi integration
- ARM support
- winograd support
- initial support of ARM autotuning records
- TOPI Vision
- Generic GPU sort support(useful for vision)
- SSD operator support
- TOPI numpy consistency
- Rename all binary operators for numpy consistecy: broadcast_add-> add, broadcast_sub -> substract, broadcast_mul -> multiply, broadcast_div->divide
- New operators: slice, LRN, equal, not_equal, less, greater
- tutorials on topi
- Initial low-bit operator support support
- Optimized popcount generation on ARM
- general bit-serial convolution and GEMM
- optimized low bit kernels
- parallel optimization
- New topi backend optimization for intel graphics
- Adapt AVX schedules for SSE target
- VTA: customized accelerator backend
- custom hardware backend example
- tutorials on how to use customized accelerator
- Initial experimental support for HLS backend
- Bugfix in SPIRV code generator for vulkan
- libdevice support, enable NVPTX backend
- Introduce NDArrayContainer for managed NDarray
- RPC and Device API
- Support communication between big/small endian machines.
- RPC and device API protocol upgrade (this is a non-backward compatible change) to support big-small endian communication. This is a non-backward compatible change, need to use the latest version of TVM runtime with the RPC
- graduate rpc from contrib, tvm.contrib.rpc->tvm.rpc
-Support tracker in Android RPC, add fault tolerance for AutoTVM
- BIG.LITTLE aware threadpool
- tvm4j graph runtime that runs end to end workload in java
- DLPack support
- Support from_dlpack and to_dlpack
- Enables bridges to pytorch
- Enable link of stackvm in runtime
- Tensorflow graphdef frontend
- Keras frontend
- improved to support reuse layers, add activations
- ONNX
- gather, LRN
- CoreML frontend
- Support C-RNN and activation functions
- Fix grads for sum and expand_like
- Enhanced operator fusion for multiple elemwise branches
- Separate nnvm fusion and compilation pass
- Unified build system to cmake, customizable cmake path for vulkan, rocm, cuda


## 0.3

This release features numerous improvements in TOPI and backends. We make the first step toward object detection support in TOPI, featuring operators necessary for YOLO and SSDs. The topi now supports numpy-style API and operator overloading. RPC is significantly improved to support resource allocation and using a pool of devices. We are adding two new backends: WebGL for running GPUs on the browser, and Vulkan for running on next-generation graphics API.
Expand Down
35 changes: 21 additions & 14 deletions apps/android_rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ You are supposed to find a free "android" in the queue status.
...

Queue Status
----------------------------
key free pending
----------------------------
android 1 0
----------------------------
-------------------------------
key total free pending
-------------------------------
android 1 1 0
-------------------------------
```


Expand All @@ -123,18 +123,25 @@ export TVM_NDK_CC=/opt/android-toolchain-arm64/bin/aarch64-linux-android-g++
python android_rpc_test.py
```

This will compile TVM IR to shared libraries (CPU and OpenCL) and run vector addition on your Android device. On my test device, it gives following results.
This will compile TVM IR to shared libraries (CPU, OpenCL and Vulkan) and run vector addition on your Android device. To verify compiled TVM IR shared libraries on OpenCL target set [`'test_opencl = True'`](https://github.com/dmlc/tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py#L25) and on Vulkan target set [`'test_vulkan = False'`](https://github.com/dmlc/tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py#L27) in [tests/android_rpc_test.py](https://github.com/dmlc/tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py), by default on CPU target will execute.
On my test device, it gives following results.

```bash
TVM: Initializing cython mode...
[01:21:43] src/codegen/llvm/codegen_llvm.cc:75: set native vector to be 32 for target aarch64
[01:21:43] src/runtime/opencl/opencl_device_api.cc:194: Initialize OpenCL platform 'Apple'
[01:21:43] src/runtime/opencl/opencl_device_api.cc:214: opencl(0)='Iris' cl_device_id=0x1024500
[01:21:44] src/codegen/llvm/codegen_llvm.cc:75: set native vector to be 32 for target aarch64
Run GPU test ...
0.000155807 secs/op
Run CPU test ...
0.00139824 secs/op
0.000962932 secs/op

Run GPU(OpenCL Flavor) test ...
0.000155807 secs/op

[23:29:34] /home/tvm/src/runtime/vulkan/vulkan_device_api.cc:674: Cannot initialize vulkan: [23:29:34] /home/tvm/src/runtime/vulkan/vulkan_device_api.cc:512: Check failed: __e == VK_SUCCESS Vulan Error, code=-9: VK_ERROR_INCOMPATIBLE_DRIVER

Stack trace returned 10 entries:
[bt] (0) /home/user/.local/lib/python3.6/site-packages/tvm-0.4.0-py3.6-linux-x86_64.egg/tvm/libtvm.so(dmlc::StackTrace[abi:cxx11]()+0x53) [0x7f477f5399f3]
.........

You can still compile vulkan module but cannot run locally
Run GPU(Vulkan Flavor) test ...
0.000225198 secs/op
```

You can define your own TVM operators and test via this RPC app on your Android device to find the most optimized TVM schedule.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@


public class MainActivity extends AppCompatActivity {
private boolean skipRelaunch = true;
// wait time before automatic restart of RPC Activity
public static final int HANDLER_RESTART_DELAY = 5000;


private void showDialog(String title, String msg) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(title);
Expand Down Expand Up @@ -91,7 +89,7 @@ private void setupRelaunch() {
final Runnable rPCStarter = new Runnable() {
public void run() {
if (switchPersistent.isChecked()) {
System.err.println("relaunching RPC activity in 5s...");
System.err.println("relaunching RPC activity...");
Intent intent = ((MainActivity) context).updateRPCPrefs();
startActivity(intent);
}
Expand All @@ -116,36 +114,22 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
System.err.println("automatic RPC restart enabled...");
updateRPCPrefs();
setupRelaunch();
} else {
System.err.println("automatic RPC restart disabled...");
updateRPCPrefs();
}
}
});

Button startRPC = findViewById(R.id.button_start_rpc);
startRPC.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = ((MainActivity) context).updateRPCPrefs();
startActivity(intent);
}
});

enableInputView(true);
}

@Override
protected void onResume() {
System.err.println("MainActivity onResume...");
System.err.println("skipRelaunch: " + skipRelaunch);
// if this is the first time onResume is called, do nothing, otherwise we
// may double launch
if (!skipRelaunch) {
enableInputView(true);
setupRelaunch();
} else {
skipRelaunch = false;
}
enableInputView(true);
setupRelaunch();
super.onResume();
}

Expand Down
16 changes: 8 additions & 8 deletions apps/android_rpc/app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ifndef config
ifneq ("$(wildcard ./config.mk)","")
config ?= config.mk
else
config ?= make/config.mk
endif
ifneq ("$(wildcard ./config.mk)","")
config ?= config.mk
else
config ?= make/config.mk
endif
endif

include $(config)
Expand All @@ -16,10 +16,10 @@ APP_STL := c++_static

APP_CPPFLAGS += -DDMLC_LOG_STACK_TRACE=0 -DTVM4J_ANDROID=1 -std=c++11 -Oz -frtti
ifeq ($(USE_OPENCL), 1)
APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
APP_CPPFLAGS += -DTVM_OPENCL_RUNTIME=1
endif

ifeq ($(USE_VULKAN), 1)
APP_CPPFLAGS += -DTVM_VULKAN_RUNTIME=1
APP_LDFLAGS += -lvulkan
APP_CPPFLAGS += -DTVM_VULKAN_RUNTIME=1
APP_LDFLAGS += -lvulkan
endif
13 changes: 2 additions & 11 deletions apps/android_rpc/app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
android:hint="@string/input_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="phone"
android:background="@android:drawable/editbox_background"/>
</LinearLayout>

Expand All @@ -37,6 +38,7 @@
android:minWidth="100dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="phone"
android:background="@android:drawable/editbox_background"/>
</LinearLayout>

Expand Down Expand Up @@ -76,15 +78,4 @@
android:textOn="@string/switch_on" />
</LinearLayout>

<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/button_start_rpc"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/start_rpc" />
</LinearLayout>

</LinearLayout>
3 changes: 1 addition & 2 deletions apps/android_rpc/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
<string name="label_address">Address</string>
<string name="label_port">Port</string>
<string name="label_key">Key</string>
<string name="label_persistent">Keep RPC Alive</string>
<string name="label_persistent">Enable RPC</string>

<string name="switch_on">Enabled</string>
<string name="switch_off">Disabled</string>

<string name="start_rpc">Start RPC</string>
<string name="stop_rpc">Stop RPC</string>
</resources>
Loading