Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
yzh119 committed Nov 3, 2021
1 parent 9660c40 commit 33a7dcb
Show file tree
Hide file tree
Showing 165 changed files with 1,087 additions and 7,861 deletions.
20 changes: 10 additions & 10 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
##############################
# Top-level Fallbacks
##############################
include/** @tqchen @jroesch @yzhliu @icemelon @junrushao1994 @comaniac @zhiics
src/** @tqchen @jroesch @yzhliu @icemelon @junrushao1994 @comaniac @zhiics
apps/** @tqchen @jroesch @yzhliu @icemelon @junrushao1994 @comaniac @zhiics
python/** @tqchen @jroesch @yzhliu @icemelon @junrushao1994 @comaniac @zhiics
include/** @tqchen @jroesch @yzhliu @icemelon9 @junrushao1994 @comaniac @zhiics
src/** @tqchen @jroesch @yzhliu @icemelon9 @junrushao1994 @comaniac @zhiics
apps/** @tqchen @jroesch @yzhliu @icemelon9 @junrushao1994 @comaniac @zhiics
python/** @tqchen @jroesch @yzhliu @icemelon9 @junrushao1994 @comaniac @zhiics

# Thirdparty license audit
3rdparty/** @tqchen @jroesch
Expand Down Expand Up @@ -67,11 +67,11 @@ rust/** @jroesch @nhynes @nhynes
vta/** @tmoreau89 @vegaluisjose

# docs
docs/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon
tutorials/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon
docs/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon9
tutorials/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon9

# tests
tests/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon
tests/** @comaniac @junrushao1994 @tqchen @jroesch @areusch @yzhliu @merrymercy @icemelon9

##############################
# Specific modules
Expand Down Expand Up @@ -129,9 +129,9 @@ include/tvm/runtime/micro/** @areusch @liangfu @tmoreau89 @manupa-arm
python/tvm/micro/** @areusch @liangfu @tmoreau89 @manupa-arm

# relay
src/relay/** @jroesch @slyubomirsky @icemelon @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
include/tvm/relay/** @jroesch @slyubomirsky @icemelon @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
python/tvm/relay/** @jroesch @slyubomirsky @icemelon @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
src/relay/** @jroesch @slyubomirsky @icemelon9 @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
include/tvm/relay/** @jroesch @slyubomirsky @icemelon9 @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994
python/tvm/relay/** @jroesch @slyubomirsky @icemelon9 @MarisaKirisame @ZihengJiang @yzhliu @vinx13 @mbrookhart @jwfromm @zhiics @anijain2305 @wweic @eqy @junrushao1994


# relay/qnn
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@ jobs:
run: >-
conda build --output-folder=conda/pkg conda/recipe &&
conda install tvm -c ./conda/pkg
- name: Build iOS RPC@MacOS
if: startsWith(matrix.os, 'macOS')
run: |
IOS_VERSION="14.0"
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
-DCMAKE_OSX_SYSROOT=iphonesimulator \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
-DUSE_IOS_RPC=ON"
mkdir build-ios-simulator
cd build-ios-simulator
cmake .. ${CMAKE_FLAGS}
cmake --build . --target ios_rpc
- name: Test@Win
if: startsWith(matrix.os, 'windows')
shell: cmd /C call {0}
Expand All @@ -98,12 +81,3 @@ jobs:
shell: bash -l {0}
run: >-
python -m pytest -v tests/python/all-platform-minimal-test
- name: Test iOS RPC@MacOS
if: startsWith(matrix.os, 'macOS')
shell: bash -l {0}
run: >-
python -m pip install tornado psutil cloudpickle &&
export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
export BUNDLE_ID=org.apache.tvmrpc &&
export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
python -m pytest -v tests/python/contrib/test_rpc_server_device.py
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
[submodule "3rdparty/libbacktrace"]
path = 3rdparty/libbacktrace
url = https://github.com/tlc-pack/libbacktrace.git
[submodule "3rdparty/cutlass"]
path = 3rdparty/cutlass
url = https://github.com/NVIDIA/cutlass
1 change: 0 additions & 1 deletion 3rdparty/cutlass
Submodule cutlass deleted from a3bcc6
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ tvm_option(USE_MKLDNN "Build with MKLDNN" OFF)
tvm_option(USE_DNNL_CODEGEN "Enable MKLDNN (DNNL) codegen" OFF)
tvm_option(USE_CUDNN "Build with cuDNN" OFF)
tvm_option(USE_CUBLAS "Build with cuBLAS" OFF)
tvm_option(USE_CUTLASS "Build with CUTLASS" OFF)
tvm_option(USE_THRUST "Build with Thrust" OFF)
tvm_option(USE_MIOPEN "Build with ROCM:MIOpen" OFF)
tvm_option(USE_ROCBLAS "Build with ROCM:RoCBLAS" OFF)
Expand Down Expand Up @@ -414,8 +413,6 @@ endif(USE_PIPELINE_EXECUTOR)
# Module rules
include(cmake/modules/VTA.cmake)
include(cmake/modules/StandaloneCrt.cmake)
include(cmake/modules/Zephyr.cmake)
include(cmake/modules/Arduino.cmake)
include(cmake/modules/CUDA.cmake)
include(cmake/modules/Hexagon.cmake)
include(cmake/modules/OpenCL.cmake)
Expand All @@ -431,7 +428,6 @@ include(cmake/modules/contrib/EthosU.cmake)
include(cmake/modules/contrib/BLAS.cmake)
include(cmake/modules/contrib/CODEGENC.cmake)
include(cmake/modules/contrib/DNNL.cmake)
include(cmake/modules/contrib/CUTLASS.cmake)
include(cmake/modules/contrib/ExampleTargetHooks.cmake)
include(cmake/modules/contrib/Random.cmake)
include(cmake/modules/contrib/Posit.cmake)
Expand Down Expand Up @@ -504,8 +500,6 @@ if(USE_MICRO)
# Unix Makefiles generator, need to add these explicit target-level dependency)
add_dependencies(tvm host_standalone_crt)
add_dependencies(tvm_runtime host_standalone_crt)
add_dependencies(tvm_runtime zephyr)
add_dependencies(tvm_runtime arduino)
endif()

if(USE_CPP_RPC)
Expand Down
6 changes: 2 additions & 4 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ We do encourage everyone to work anything they are interested in.
- [Giuseppe Rossini](https://github.com/giuseros): @giuseros - aot, arm
- [Siju Samuel](https://github.com/siju-samuel): @siju-samuel - frontends
- [Junru Shao](https://github.com/junrushao1994) (PMC): @junrushao1994 - relay, compiler
- [Haichen Shen](https://github.com/icemelon) (PMC): @icemelon - relay, topi
- [Haichen Shen](https://github.com/icemelon9) (PMC): @icemelon9 - relay, topi
- [Siva Rama Krishna Reddy](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
Expand Down Expand Up @@ -131,14 +131,13 @@ We do encourage everyone to work anything they are interested in.
- [Giuseppe Rossini](https://github.com/giuseros): @giuseros
- [Siju Samuel](https://github.com/siju-samuel): @siju-samuel
- [Junru Shao](https://github.com/junrushao1994): @junrushao1994
- [Haichen Shen](https://github.com/icemelon): @icemelon
- [Haichen Shen](https://github.com/icemelon9): @icemelon9
- [Xingjian Shi](https://github.com/sxjscience): @sxjscience
- [Mark Shields](https://github.com/mbs-octoml): @mbs-octoml
- [Christopher Sidebottom](https://github.com/mousius): @mousius
- [Siva Rama Krishna Reddy](https://github.com/srkreddy1238): @srkreddy1238
- [Dmitriy Smirnov](https://github.com/d-smirnov): @d-smirnov
- [Jon Soifer](https://github.com/soiferj): @soiferj
- [Chris Sullivan](https://github.com/csullivan): @csullivan
- [Zhixun Tan](https://github.com/phisiart): @phisiart
- [Andrew Tulloch](https://github.com/ajtulloch): @ajtulloch
- [Jorn Tuyls](https://github.com/jtuyls): @jtuyls
Expand All @@ -151,7 +150,6 @@ We do encourage everyone to work anything they are interested in.
- [Logan Weber](https://github.com/weberlo): @weberlo
- [Matt Welsh](https://github.com/mdw-octoml): @mdw-octoml
- [Jian Weng](https://github.com/were): @were
- [wrongtest](https://github.com/wrongtest): @wrongtest
- [Yong Wu](https://github.com/yongwww): @yongwww
- [Zhao Wu](https://github.com/FrozenGene): @FrozenGene
- [Bing Xu](https://github.com/antinucleon): @antinucleon
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import org.jenkinsci.plugins.pipeline.modeldefinition.Utils

// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
ci_lint = "tlcpack/ci-lint:v0.67"
ci_gpu = "tlcpack/ci-gpu:v0.78"
ci_gpu = "tlcpack/ci-gpu:v0.77"
ci_cpu = "tlcpack/ci-cpu:v0.78"
ci_wasm = "tlcpack/ci-wasm:v0.71"
ci_i386 = "tlcpack/ci-i386:v0.74"
Expand Down Expand Up @@ -353,7 +353,7 @@ stage('Unit Test') {
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${ci_i386} ./tests/scripts/task_ci_setup.sh"
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_unittest.sh"
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_integration_i386only.sh"
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_integration.sh"
sh "${docker_run} ${ci_i386} ./tests/scripts/task_python_vta_fsim.sh"
junit "build/pytest-results/*.xml"
}
Expand Down
5 changes: 0 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,3 @@ The Unlicense
-------------

3rdparty/rang

BSD 3-Clause "New" or "Revised" License
---------------------------------------

3rdparty/cutlass
10 changes: 3 additions & 7 deletions apps/hexagon_launcher/launcher_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,12 @@ const tvm::runtime::PackedFunc get_module_func(tvm::runtime::Module module,
}

void reset_device_api() {
const tvm::runtime::PackedFunc api = get_runtime_func("device_api.hexagon.v2");
const tvm::runtime::PackedFunc api = get_runtime_func("device_api.cpu");
tvm::runtime::Registry::Register("device_api.hexagon", true).set_body(api);
}

tvm::runtime::Module load_module(const std::string& file_name) {
static const tvm::runtime::PackedFunc loader =
get_runtime_func("runtime.module.loadfile_hexagon");
static const tvm::runtime::PackedFunc loader = get_runtime_func("runtime.module.loadfile_so");
tvm::runtime::TVMRetValue rv = loader(file_name);
if (rv.type_code() == kTVMModuleHandle) {
return rv.operator tvm::runtime::Module();
Expand All @@ -170,10 +169,7 @@ tvm::runtime::Module create_graph_executor(const std::string& graph_json,
uint64_t device_type = device.device_type;
uint64_t device_id = device.device_id;

std::string linked_params = "tvm.runtime.hexagon.lookup_linked_params";
const tvm::runtime::PackedFunc lookup_linked_params = get_runtime_func(linked_params);
// Use default param lookup function (linked into the module).
tvm::runtime::TVMRetValue rv =
create_executor(graph_json, graph_module, lookup_linked_params, device_type, device_id);
tvm::runtime::TVMRetValue rv = create_executor(graph_json, graph_module, device_type, device_id);
return rv.operator tvm::runtime::Module();
}
2 changes: 0 additions & 2 deletions apps/hexagon_launcher/launcher_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ struct Model {

static tvm::Device device() { return tvm::Device{static_cast<DLDeviceType>(kDLHexagon), 0}; }

static tvm::Device external() { return tvm::Device{static_cast<DLDeviceType>(kDLCPU), 0}; }

tvm::runtime::PackedFunc run;
};

Expand Down
17 changes: 3 additions & 14 deletions apps/hexagon_launcher/launcher_hexagon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ extern "C" {
#include <qurt_hvx.h>
}

#include <tvm/runtime/object.h>

#include <algorithm>
#include <memory>
#include <string>
Expand Down Expand Up @@ -108,7 +106,7 @@ AEEResult __QAIC_HEADER(launcher_rpc_set_input)(remote_handle64 handle, int inpu

DLTensor tensor{
const_cast<unsigned char*>(input_value),
Model::external(),
Model::device(),
meta->ndim,
meta->dtype,
const_cast<int64_t*>(meta->shape),
Expand Down Expand Up @@ -155,16 +153,6 @@ AEEResult __QAIC_HEADER(launcher_rpc_get_output)(remote_handle64 handle, int out
tvm::runtime::PackedFunc get_output = get_module_func(TheModel->graph_executor, "get_output");
tvm::runtime::NDArray output = get_output(output_idx);

std::vector<int64_t> shape_vec{output->shape, output->shape + output->ndim};

auto* container = new tvm::runtime::NDArray::Container(
static_cast<void*>(output_value), shape_vec, output->dtype, Model::external());
container->SetDeleter([](tvm::Object* container) {
delete static_cast<tvm::runtime::NDArray::Container*>(container);
});

tvm::runtime::NDArray host_output(GetObjectPtr<tvm::Object>(container));

if (meta_size != 0) {
auto* meta = reinterpret_cast<tensor_meta*>(output_meta);
if (meta_size < meta->meta_size(output->ndim)) {
Expand All @@ -182,7 +170,8 @@ AEEResult __QAIC_HEADER(launcher_rpc_get_output)(remote_handle64 handle, int out
return error_too_small(__func__, "value_size", value_size, data_size);
}

host_output.CopyFrom(output);
auto data = reinterpret_cast<decltype(output_value)>(output->data);
std::copy(data, data + data_size, output_value);
}

return AEE_SUCCESS;
Expand Down
1 change: 0 additions & 1 deletion apps/ios_rpc/tvmrpc/ViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ - (void)open {
server_.port = self.proxyPort.text.intValue;
server_.key = self.proxyKey.text;
server_.custom_addr = [NSString stringWithUTF8String:args.custom_addr];
server_.verbose = args.verbose;
server_.delegate = self;

[server_ start];
Expand Down
13 changes: 6 additions & 7 deletions apps/microtvm/arduino/template_project/microtvm_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import tempfile
import time
from string import Template
import re

import serial
import serial.tools.list_ports
Expand Down Expand Up @@ -103,7 +102,7 @@ def server_info_query(self, tvm_version):
return server.ServerInfo(
platform_name="arduino",
is_template=IS_TEMPLATE,
model_library_format_path="" if IS_TEMPLATE else MODEL_LIBRARY_FORMAT_PATH,
model_library_format_path=MODEL_LIBRARY_FORMAT_PATH,
project_options=PROJECT_OPTIONS,
)

Expand Down Expand Up @@ -288,11 +287,11 @@ def _find_modified_include_path(self, project_dir, file_path, include_path):
return include_path

def _get_platform_version(self, arduino_cli_path: str) -> float:
# sample output of this command:
# 'arduino-cli alpha Version: 0.18.3 Commit: d710b642 Date: 2021-05-14T12:36:58Z\n'
version_output = subprocess.check_output([arduino_cli_path, "version"], encoding="utf-8")
full_version = re.findall("version: ([\.0-9]*)", version_output.lower())
full_version = full_version[0].split(".")
version_output = (
version_output.replace("\n", "").replace("\r", "").replace(":", "").lower().split(" ")
)
full_version = version_output[version_output.index("version") + 1].split(".")
version = float(f"{full_version[0]}.{full_version[1]}")

return version
Expand Down Expand Up @@ -330,7 +329,7 @@ def generate_project(self, model_library_format_path, standalone_crt_dir, projec

# Unpack the MLF and copy the relevant files
metadata = self._disassemble_mlf(model_library_format_path, source_dir)
shutil.copy2(model_library_format_path, project_dir / MODEL_LIBRARY_FORMAT_RELPATH)
shutil.copy2(model_library_format_path, source_dir / "model")

# For AOT, template model.h with metadata to minimize space usage
if options["project_type"] == "example_project":
Expand Down
9 changes: 0 additions & 9 deletions apps/microtvm/zephyr/template_project/microtvm_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ def _get_nrf_device_args(options):
choices=(True, False),
help="Treat warnings as errors and raise an Exception.",
),
server.ProjectOption(
"compile_definitions",
help="Extra definitions added project compile.",
),
]


Expand Down Expand Up @@ -423,11 +419,6 @@ def generate_project(self, model_library_format_path, standalone_crt_dir, projec

cmake_f.write(line)

if options.get("compile_definitions"):
flags = options.get("compile_definitions")
for item in flags:
cmake_f.write(f"target_compile_definitions(app PUBLIC {item})\n")

self._create_prj_conf(project_dir, options)

# Populate crt-config.h
Expand Down
Loading

0 comments on commit 33a7dcb

Please sign in to comment.