Skip to content

Commit

Permalink
Merge branch 'main' into relay_matmul_op
Browse files Browse the repository at this point in the history
  • Loading branch information
jcf94 committed Jun 24, 2021
2 parents d5e2625 + d0791d3 commit d9c6e9b
Show file tree
Hide file tree
Showing 194 changed files with 4,860 additions and 2,702 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ conda/pkg
.envrc
*.nix

# Docker files
.sudo_as_admin_successful

# Downloaded models/datasets
.tvm_test_data
.dgl
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ else(MSVC)
# ld option to warn if symbols are undefined (e.g. libtvm_runtime.so
# using symbols only present in libtvm.so). Not needed for MSVC,
# since this is already the default there.
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
set(TVM_NO_UNDEFINED_SYMBOLS "-Wl,-undefined,error")
else()
set(TVM_NO_UNDEFINED_SYMBOLS "-Wl,--no-undefined")
Expand Down
43 changes: 19 additions & 24 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,33 @@ We do encourage everyone to work anything they are interested in.
- [Aditya Atluri](https://github.com/adityaatluri): @adityaatluri - rocm
- [Matthew Barrett](https://github.com/mbaret): @mbaret - byoc, arm
- [Matthew Brookhart](https://github.com/mbrookhart): @mbrookhart - relay, frontends
- [Tianqi Chen](https://github.com/tqchen) (PMC): @tqchen - topi, compiler, relay, docs
- [Liangfu Chen](https://github.com/liangfu): @liangfu - vta, chisel, intel FPGA, c runtime
- [Tianqi Chen](https://github.com/tqchen) (PMC): @tqchen - topi, compiler, relay, docs
- [Wei Chen](https://github.com/wweic): @wweic - runtime, relay, vm
- [Zhi Chen](https://github.com/zhiics) (PMC): @zhiics - relay, quantization, pass manager
- [Chenfan](https://github.com/jcf94): @jcf94 - auto_scheduler
- [Josh Fromm](https://github.com/jwfromm): @jwfromm - frontends, quantization, topi
- [Yuwei Hu](https://github.com/Huyuwei): @Huyuwei - topi, frontends
- [Nick Hynes](https://github.com/nhynes): @nhynes: - sgx, rust
- [Animesh Jain](https://github.com/anijain2305): @anijain2305 - quantization, relay
- [Chenfan Jia](https://github.com/jcf94): @jcf94 - auto_scheduler
- [Ziheng Jiang](https://github.com/ZihengJiang) (PMC): @ZihengJiang - relay, compiler
- [Marisa Kirisame](https://github.com/MarisaKirisame): @MarisaKirisame - relay
- [Wuwei Lin](https://github.com/vinx13): @vinx13 - relay, topi
- [Yizhi Liu](https://github.com/yzhliu) (PMC): @yzhliu - jvm, topi, relay
- [Steven Lyubomirsky](https://github.com/slyubomirsky): @slyubomirsky - relay
- [Hao Lu](https://github.com/hlu1): @hlu1 - nnpack, frontends
- [Steven Lyubomirsky](https://github.com/slyubomirsky): @slyubomirsky - relay
- [Masahiro Masuda](https://github.com/masahi) (PMC): @masahi - topi, relay
- [Thierry Moreau](https://github.com/tmoreau89) (PMC): @tmoreau89 - vta
- [Kazutaka Morita](https://github.com/kazum): @kazum - frontends, opencl
- [Trevor Morris](https://github.com/trevor-m): @trevor-m - byoc, compiler
- [Leandro Nunes](https://github.com/leandron): @leandron - tvmc
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic - hexagon, llvm
- [Andrew Reusch](https://github.com/areusch): @areusch - runtime, µTVM
- [Andrew Reusch](https://github.com/areusch): @areusch - runtime, microTVM
- [Jared Roesch](https://github.com/jroesch) (PMC): @jroesch - relay
- [Siju Samuel](https://github.com/siju-samuel): @siju-samuel - frontends
- [Siva](https://github.com/srkreddy1238): @srkreddy1238 - frontends, golang
- [Junru Shao](https://github.com/junrushao1994) @junrushao1994 - relay, compiler
- [Haichen Shen](https://github.com/icemelon9) (PMC): @icemelon9 - relay, topi
- [Siva](https://github.com/srkreddy1238): @srkreddy1238 - frontends, golang
- [Zhixun Tan](https://github.com/phisiart): @phisiart - opengl, web
- [Andrew Tulloch](https://github.com/ajtulloch): @ajtulloch - topi, compiler, runtime
- [Luis Vega](https://github.com/vegaluisjose): @vegaluisjose - vta, chisel
Expand All @@ -86,28 +86,25 @@ We do encourage everyone to work anything they are interested in.
- [Matthew Barrett](https://github.com/mbaret): @mbaret
- [Arnaud Bergeron](https://github.com/abergeron): @abergeron
- [Matthew Brookhart](https://github.com/mbrookhart): @mbrookhart
- [Tianqi Chen](https://github.com/tqchen): @tqchen
- [Liangfu Chen](https://github.com/liangfu): @liangfu
- [Tianqi Chen](https://github.com/tqchen): @tqchen
- [Zhi Chen](https://github.com/zhiics): @zhiics
- [Chenfan](https://github.com/jcf94): @jcf94
- [Neo Chien](https://github.com/cchung100m): @cchung100m
- [Meghan Cowan](https://github.com/cowanmeg): @cowanmeg
- [Balint Cristian](https://github.com/cbalint13): @cbalint13
- [Egor Churaev](https://github.com/echuraev): @echuraev - metal
- [Xiaoqiang Dan](https://github.com/xqdan): @xqdan
- [Haozheng Fan](https://github.com/hzfan): @hzfan
- [Josh Fromm](https://github.com/jwfromm): @jwfromm
- [Siyuan Feng](https://github.com/Hzfengsy): @Hzfengsy
- [Josh Fromm](https://github.com/jwfromm): @jwfromm
- [Sergei Grechanik](https://github.com/sgrechanik-h): @sgrechanik-h
- [Hao Lu](https://github.com/hlu1): @hlu1
- [Bohan Hou](https://github.com/spectrometerHBH): @spectrometerHBH
- [Nick Hynes](https://github.com/nhynes): @nhynes
- [Yuwei Hu](https://github.com/Huyuwei): @Huyuwei
- [Luke Hutton](https://github.com/lhutton1): @lhutton1
- [Nick Hynes](https://github.com/nhynes): @nhynes
- [Animesh Jain](https://github.com/anijain2305): @anijain2305
- [Chenfan Jia](https://github.com/jcf94): @jcf94
- [Hua Jiang](https://github.com/huajsj): @huajsj
- [Leandro Nunes](https://github.com/leandron): @leandron
- [Yizhi Liu](https://github.com/yzhliu) : @yzhliu
- [Zhixun Tan](https://github.com/phisiart): @phisiart
- [Xiaoqiang Dan](https://github.com/xqdan): @xqdan
- [Ziheng Jiang](https://github.com/ZihengJiang): @ZihengJiang
- [Manupa Karunaratne](https://github.com/manupa-arm): @manupa-arm
- [Marisa Kirisame](https://github.com/MarisaKirisame): @MarisaKirisame
Expand All @@ -116,33 +113,37 @@ We do encourage everyone to work anything they are interested in.
- [Andrew Liu](https://github.com/hypercubestart): @hypercubestart
- [Henry Liu](https://github.com/optima2005): @optima2005
- [Xin Liu](https://github.com/Meteorix): @Meteorix
- [Yizhi Liu](https://github.com/yzhliu) : @yzhliu
- [Hao Lu](https://github.com/hlu1): @hlu1
- [Steven Lyubomirsky](https://github.com/slyubomirsky): @slyubomirsky
- [Masahiro Masuda](https://github.com/masahi): @masahi
- [Sergey Mironov](https://github.com/grwlf): @grwlf
- [Thierry Moreau](https://github.com/tmoreau89): @tmoreau89
- [Kazutaka Morita](https://github.com/kazum): @kazum
- [Trevor Morris](https://github.com/trevor-m): @trevor-m
- [Tatsuya Nishiyama](https://github.com/nishi-t): @nishi-t
- [Leandro Nunes](https://github.com/leandron): @leandron
- [Wei Pan](https://github.com/wpan11nv): @wpan11nv
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic
- [Pariksheet Pinjari](https://github.com/PariksheetPinjari909): @PariksheetPinjari909
- [Josh Pollock](https://github.com/joshpoll): @joshpoll
- [Andrew Reusch](https://github.com/areusch): @areusch
- [Jared Roesch](https://github.com/jroesch): @jroesch
- [Giuseppe Rossini](https://github.com/giuseros): @giuseros
- [Andrew Reusch](https://github.com/areusch): @areusch
- [Dmitriy Smirnov](https://github.com/d-smirnov): @d-smirnov
- [Siva](https://github.com/srkreddy1238): @srkreddy1238
- [Siju Samuel](https://github.com/siju-samuel): @siju-samuel
- [Junru Shao](https://github.com/junrushao1994): @junrushao1994
- [Haichen Shen](https://github.com/icemelon9): @icemelon9
- [Xingjian Shi](https://github.com/sxjscience): @sxjscience
- [Siva](https://github.com/srkreddy1238): @srkreddy1238
- [Dmitriy Smirnov](https://github.com/d-smirnov): @d-smirnov
- [Jon Soifer](https://github.com/soiferj): @soiferj
- [Zhixun Tan](https://github.com/phisiart): @phisiart
- [Andrew Tulloch](https://github.com/ajtulloch): @ajtulloch
- [Luis Vega](https://github.com/vegaluisjose): @vegaluisjose
- [Thomas Viehmann](https://github.com/t-vi): @t-vi
- [Alex Weaver](https://github.com/alex-weaver): @alex-weaver
- [Yao Wang](https://github.com/kevinthesun): @kevinthesun
- [Leyuan Wang](https://github.com/Laurawly): @Laurawly
- [Alex Weaver](https://github.com/alex-weaver): @alex-weaver
- [Logan Weber](https://github.com/weberlo): @weberlo
- [Jian Weng](https://github.com/were): @were
- [Yong Wu](https://github.com/yongwww): @yongwww
Expand All @@ -155,9 +156,3 @@ We do encourage everyone to work anything they are interested in.

## List of Contributors
- [Full List of Contributors](https://github.com/apache/tvm/graphs/contributors)
- To contributors: please add your name to the list.
- [Qiao Zhang](https://github.com/zhangqiaorjc)
- [Haolong Zhang](https://github.com/haolongzhangm)
- [Cody Hao Yu](https://github.com/comaniac)
- [Chris Nuernberger](https://github.com/cnuernber)
- [Shoubhik Bhattacharya](https://github.com/shoubhik)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ v0.7 brings many major features. The community works together to refactor the in
* Intial Hexagon support
* Bring your own codegen (BYOC) support

The community also continues to bring high quality improvements to the existing modules including, but not limited to: better frontend coverage, performance, quantization, uTVM and dynamic shape support.
The community also continues to bring high quality improvements to the existing modules including, but not limited to: better frontend coverage, performance, quantization, microTVM and dynamic shape support.

## New Features
### Automatic Scheduling (Experimental)
Expand Down
1 change: 1 addition & 0 deletions apps/android_rpc/app/src/main/jni/tvm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#ifdef TVM_OPENCL_RUNTIME
#include "../src/runtime/opencl/opencl_device_api.cc"
#include "../src/runtime/opencl/opencl_module.cc"
#include "../src/runtime/opencl/texture_pool.cc"
#include "../src/runtime/source_utils.cc"
#endif

Expand Down
12 changes: 11 additions & 1 deletion apps/cpp_rpc/rpc_env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ int mkdir(const char* path, int /* ignored */) { return _mkdir(path); }
#include <iostream>
#include <string>
#include <vector>

#include "../../src/support/utils.h"
#include "rpc_env.h"

Expand Down Expand Up @@ -95,7 +96,16 @@ RPCEnv::RPCEnv(const std::string& wd) {
auto cmdline = fopen("/proc/self/cmdline", "r");
fread(cwd, 1, sizeof(cwd), cmdline);
fclose(cmdline);
base_ = "/data/data/" + std::string(cwd) + "/cache/rpc";
std::string android_base_ = "/data/data/" + std::string(cwd) + "/cache";
struct stat statbuf;
// Check if application data directory exist. If not exist, usually means we run tvm_rpc from
// adb shell terminal.
if (stat(android_base_.data(), &statbuf) == -1 || !S_ISDIR(statbuf.st_mode)) {
// Tmp directory is always writable for 'shell' user.
android_base_ = "/data/local/tmp";
}
base_ = android_base_ + "/rpc";

#elif !defined(_WIN32)
char cwd[PATH_MAX];
if (getcwd(cwd, sizeof(cwd))) {
Expand Down
13 changes: 9 additions & 4 deletions apps/cpp_rpc/rpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
* \brief RPC Server implementation.
*/
#include <tvm/runtime/registry.h>
#if defined(__linux__) || defined(__ANDROID__)
#if defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__)
#include <signal.h>
#include <sys/select.h>
#include <sys/wait.h>
#endif
Expand Down Expand Up @@ -52,7 +53,7 @@ namespace runtime {
* \brief wait the child process end.
* \param status status value
*/
#if defined(__linux__) || defined(__ANDROID__)
#if defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__)
static pid_t waitPidEintr(int* status) {
pid_t pid = 0;
while ((pid = waitpid(-1, status, 0)) == -1) {
Expand Down Expand Up @@ -162,7 +163,7 @@ class RPCServer {
}

int timeout = GetTimeOutFromOpts(opts);
#if defined(__linux__) || defined(__ANDROID__)
#if defined(__linux__) || defined(__ANDROID__) || defined(__APPLE__)
// step 3: serving
if (timeout != 0) {
const pid_t timer_pid = fork();
Expand Down Expand Up @@ -203,7 +204,7 @@ class RPCServer {
auto pid = fork();
if (pid == 0) {
ServerLoopProc(conn, addr, work_dir_);
exit(0);
_exit(0);
}
// Wait for the result
int status = 0;
Expand All @@ -219,6 +220,10 @@ class RPCServer {
auto dur = high_resolution_clock::now() - start_time;

LOG(INFO) << "Serve Time " << duration_cast<milliseconds>(dur).count() << "ms";
#else
LOG(WARNING) << "Unknown platform. It is not known how to bring up the subprocess."
<< " RPC will be launched in the main thread.";
ServerLoopProc(conn, addr, work_dir_);
#endif
// close from our side.
LOG(INFO) << "Socket Connection Closed";
Expand Down
8 changes: 4 additions & 4 deletions apps/microtvm/reference-vm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ Reference VMs are organized as follows:

## Creating Releases

1. Build the base box for the given platform: `$ ./base-box-tool.py build <platform>`
1. Build the base box for the given platform: `$ ./base-box-tool.py [--provider=<provider>] build <platform>`
2. Run release tests for each platform:
1. Connect any needed hardware to the VM host machine.
2. Run tests: `$ ./base-box-tool.py test <platform> [--test-device-serial=<serial>]`. This
2. Run tests: `$ ./base-box-tool.py [--provider=<provider>] test [--microtvm-platform=<platform>] <platform> [--test-device-serial=<serial>]`. This
command does the following for each provider:
1. Copies all files inside `./<platform>` except `.vagrant` and `base-box` to
`./release-test`. This is done to avoid reusing any VM the developer may have started.
2. Executes `$ vagrant up --provider=<provider>`.
2. Executes `$ vagrant up [--provider=<provider>]`.
3. Finds an attached USB device matching the VID and PID specified in `test-config.json`,
and if `--test-device-serial` was given, that serial number (as reported to USB). Creates
a rule to autoconnect this device to the VM, and also attaches it to the VM>
4. SSHs to the VM, `cd` to the TVM root directory, and runs `test_cmd` from
`test-config.json`. Nonzero status means failure.
3. If release tests fail, fix them and restart from step 1.
4. If release tests pass: `$ ./base-box-tool.py release <platform> <version>`. Be sure you've logged
4. If release tests pass: `$ ./base-box-tool.py [--provider=<provider>] release <--release-version=<version>> <--platform-version=<version>> <platform>`. Be sure you've logged
in to Vagrant Cloud using the `vagrant` tool.
Loading

0 comments on commit d9c6e9b

Please sign in to comment.