Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5742776
[Relay][Frontend][ONNX] operator support: ConstantOfShape
cchung100m Oct 15, 2019
28aefac
[Relay][Frontend][ONNX] operator support: ConstantOfShape
cchung100m Oct 15, 2019
1c0e743
[QNN] Change default rouning to UPWARD. (#4131)
anijain2305 Oct 16, 2019
46fa6ee
[Relay][Training] Add and fix gradients (#4126)
altanh Oct 16, 2019
c106910
Adding support for dequantizing from int32 to float32. (#4130)
shoubhik Oct 16, 2019
e3fbdc8
Update PULL_REQUEST_TEMPLATE.md
tqchen Oct 16, 2019
02c1e11
[RUNTIME] Refactor object python FFI to new protocol. (#4128)
tqchen Oct 16, 2019
3185e4a
[Relay] Improve build error when no lowered funcs are produced (#4132)
weberlo Oct 17, 2019
972f019
[TOPI][x86] Cascade lake support. (#4123)
anijain2305 Oct 17, 2019
a8a9831
[DOCKER] Pin torchvision==0.4.1 (#4140)
mshawcroft Oct 17, 2019
cf04697
[PATCH] Fix undefined __floatdihf in libtvmruntime.so on aarch64. (#4…
lhutton1 Oct 17, 2019
4052de6
[relay][vm] Separate VM runtime with executable (#4100)
zhiics Oct 17, 2019
36a9677
[Relay][Frontend][TF] Add tensor array ops (#3798)
wweic Oct 18, 2019
fe418ec
Fix typo (#4144)
gussmith23 Oct 18, 2019
e7c88a9
[CI] Pin NNPack pthreadtools version (#4152)
tqchen Oct 18, 2019
fdb01cb
[QNN][TFLite] Parsing QNN Add op. Adding MobilenetV2. (#4142)
anijain2305 Oct 18, 2019
687d4a8
Add lift_if_then_else pass (#3865)
kevinthesun Oct 18, 2019
3c4b7cc
[CI] Update cpu docker (#4153)
tqchen Oct 18, 2019
32aad56
[Refactor] Rename Datatype to ADT (#4156)
wweic Oct 20, 2019
97ea31c
[Runtime] Enable option to use OpenMP thread pool (#4089)
icemelon Oct 20, 2019
7895adb
[REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. (#4161)
tqchen Oct 21, 2019
72dfa60
[CI] Move golang tests to the end (#4164)
tqchen Oct 21, 2019
e583542
Add support for quantized multiply to Relay (#4141)
ekalda Oct 21, 2019
d660e51
Fix missspelling (#4166)
monkeyking Oct 21, 2019
e0d286a
[Relay][Pass] Count MAC for BatchMatMul (#4157)
icemelon Oct 21, 2019
6f9d028
[Relay][QNN] Add unit test for int8 (#4159)
zhiics Oct 21, 2019
5a17707
[relay][vm] Reuse allocated device memory (#4170)
zhiics Oct 22, 2019
c3f02c4
add missing gradient check to gradient pass (#4169)
altanh Oct 22, 2019
a21904a
merge extract_from_program and extract_from_multiple_progam (#4173)
comaniac Oct 22, 2019
ecb0a7e
[TOPI] Added support for Mali Bifrost target (#4047)
mbaret Oct 22, 2019
101e3e0
[Relay][Frontend][TF] Fix Size operator (#4175)
soiferj Oct 22, 2019
a740423
[Pass] Remove dead code (#4177)
wweic Oct 23, 2019
447d6d2
change test case
cchung100m Oct 23, 2019
5408d3a
[rpc] use callback func to do send & recv (#4147)
yzhliu Oct 23, 2019
c147a31
Add support and testing for tf.assert (as no-op) and tf.no_op to TF R…
broune Oct 23, 2019
4a154d8
[DOCS] Add TensorFlow frontend docs (#4154)
soiferj Oct 24, 2019
f9b5b30
Revert "[Relay][QNN] Add unit test for int8 (#4159)" (#4192)
tqchen Oct 24, 2019
2460f90
[cmake][ANTLR] Support setting path to ANTLR jar (#4176)
soiferj Oct 24, 2019
c9aa55c
Split adaptive_pool2d_avg into sum and div (#4186)
kevinthesun Oct 24, 2019
f6a0aa2
[Documentation]Fix example code in comment of tvm.build_module.build(…
optima2005 Oct 24, 2019
e74a0eb
[relay] use time_evaluator for measurement (#4191)
zhiics Oct 24, 2019
b08fe81
Add parser support for SUM tflite operator (#4182)
inadob Oct 24, 2019
2e0dbaa
[Relay] Fix memory leak in the interpreter (#4155)
MarisaKirisame Oct 24, 2019
4ab7363
[TOPI] Tunable Template for Conv2D HWCN on CUDA (#4168)
comaniac Oct 24, 2019
324a960
TensorCore Support using Intrinsic (#4136)
Hzfengsy Oct 24, 2019
78ca6fc
[NODE][REFACTOR] Refactor reflection system in node. (#4189)
tqchen Oct 24, 2019
decccd6
hotfix the ci (#4199)
tqchen Oct 24, 2019
493c98d
[TOPI][x86] Legalize - Support int8xint8 convolution to use VNNI inst…
anijain2305 Oct 25, 2019
bc138a8
[Relay][Frontend][ONNX] Change test case
cchung100m Oct 25, 2019
1ad6a2a
[Relay] crossentropy_with_logits and its gradient (#4075)
MarisaKirisame Oct 25, 2019
7732873
[hotfix] missing include headers (#4204)
zhiics Oct 25, 2019
93d610a
[Relay][Training] Add checkpoint annotation for checkpointing memory …
altanh Oct 27, 2019
9cc7874
[Relay][Params] Add APIs for storing and retrieving parameters from i…
jroesch Oct 27, 2019
07606e4
[Relay][Frontend][ONNX] Add support for op Where (#4184)
soiferj Oct 27, 2019
13b2856
[VTA][Chisel] TSIM VTA Source Refactor (#4163)
BenjaminTu Oct 27, 2019
66b7190
[Relay][Frontend][ONNX] operator support: ConstantOfShape
cchung100m Oct 15, 2019
a803bbb
[Relay][Frontend][ONNX] operator support: ConstantOfShape
cchung100m Oct 15, 2019
44fa066
change test case
cchung100m Oct 23, 2019
641c4cd
[Relay][Frontend][ONNX] Change test case
cchung100m Oct 25, 2019
959efb9
[Relay][Frontend][ONNX] operator support: ConstantOfShape
cchung100m Oct 15, 2019
ae3579f
[Relay][Frontend][ONNX] Solve conflict
cchung100m Oct 27, 2019
5eea653
[Relay][Frontend][ONNX] Solve conflict
cchung100m Oct 27, 2019
920127d
Revert "[Relay][Frontend][ONNX] Change test case"
cchung100m Oct 27, 2019
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/dmlc/tvm/blob/master/CONTRIBUTORS.md#reviewers).
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from [Reviewers](https://github.com/dmlc/tvm/blob/master/CONTRIBUTORS.md#reviewers) by @ them in the pull request thread.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include(cmake/util/FindCUDA.cmake)
include(cmake/util/FindVulkan.cmake)
include(cmake/util/FindLLVM.cmake)
include(cmake/util/FindROCM.cmake)
include(cmake/util/FindANTLR.cmake)

if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/config.cmake)
include(${CMAKE_CURRENT_BINARY_DIR}/config.cmake)
Expand All @@ -33,6 +34,7 @@ tvm_option(USE_LLVM "Build with LLVM, can be set to specific llvm-config path" O
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_OPENMP "Build with OpenMP thread pool implementation" OFF)
tvm_option(USE_RELAY_DEBUG "Building Relay in debug mode..." OFF)
tvm_option(USE_SGX "Build with SGX" OFF)
tvm_option(USE_RTTI "Build with RTTI" ON)
Expand Down Expand Up @@ -154,6 +156,7 @@ list(APPEND COMPILER_SRCS ${RELAY_BACKEND_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_IR_SRCS})
list(APPEND COMPILER_SRCS ${RELAY_QNN_SRCS})


if(USE_VM_PROFILER)
message(STATUS "Build compiler with Relay VM profiler support...")
file(GLOB BACKEND_VM_PROFILER_SRCS src/relay/backend/vm/profiler/*.cc)
Expand Down Expand Up @@ -233,6 +236,7 @@ include(cmake/modules/VTA.cmake)
include(cmake/modules/CUDA.cmake)
include(cmake/modules/OpenCL.cmake)
include(cmake/modules/OpenGL.cmake)
include(cmake/modules/OpenMP.cmake)
include(cmake/modules/Vulkan.cmake)
include(cmake/modules/Metal.cmake)
include(cmake/modules/ROCM.cmake)
Expand Down Expand Up @@ -264,6 +268,7 @@ add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS})
add_library(tvm_topi SHARED ${TOPI_SRCS})
add_library(tvm_runtime SHARED ${RUNTIME_SRCS})


if(USE_RELAY_DEBUG)
message(STATUS "Building Relay in debug mode...")
set_target_properties(tvm PROPERTIES COMPILE_DEFINITIONS "USE_RELAY_DEBUG")
Expand Down
10 changes: 8 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@
// - Tag the new version as the lates
// - Periodically cleanup the old versions on local workers
//

// Hashtag in the source to build current CI docker builds
//
// - ci-cpu:v0.54: e7c88a99f830de30814df14eaa980547ecbd61c1
//

ci_lint = "tvmai/ci-lint:v0.51"
ci_gpu = "tvmai/ci-gpu:v0.54"
ci_cpu = "tvmai/ci-cpu:v0.52"
ci_cpu = "tvmai/ci-cpu:v0.54"
ci_i386 = "tvmai/ci-i386:v0.52"

// tvm libraries
Expand Down Expand Up @@ -196,10 +202,10 @@ stage('Build') {
make(ci_cpu, 'build', '-j2')
pack_lib('cpu', tvm_lib)
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_unittest.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_integration.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_python_vta.sh"
sh "${docker_run} ${ci_cpu} ./tests/scripts/task_golang.sh"
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ set(USE_BLAS none)
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
set(USE_MKL_PATH none)

# Whether use OpenMP thread pool, choices: gnu, intel
# Note: "gnu" uses gomp library, "intel" uses iomp5 library
set(USE_OPENMP none)

# Whether use contrib.random in runtime
set(USE_RANDOM OFF)

Expand All @@ -140,6 +144,10 @@ set(USE_ROCBLAS OFF)
set(USE_SORT ON)

# Build ANTLR parser for Relay text format
# Possible values:
# - ON: enable ANTLR by searching default locations (cmake find_program for antlr4 and /usr/local for jar)
# - OFF: disable ANTLR
# - /path/to/antlr-*-complete.jar: path to specific ANTLR jar file
set(USE_ANTLR OFF)

# Whether use Relay debug mode
Expand Down
24 changes: 1 addition & 23 deletions cmake/modules/ANTLR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,7 @@
# specific language governing permissions and limitations
# under the License.
if(USE_ANTLR)
find_program(ANTLR4 antlr4)

if (NOT ANTLR4)
file(GLOB_RECURSE ANTLR4JAR
/usr/local/lib/antlr-*-complete.jar
/usr/local/Cellar/*antlr-*-complete.jar)

# Get the first element of the list of antlr jars.
# Sort and reverse the list so the item selected is the highest
# version in lib or else in Cellar if no lib installation exists.
list(SORT ANTLR4JAR)
list(REVERSE ANTLR4JAR)
list(GET ANTLR4JAR 0 ANTLR4JAR)

set(JAVA_HOME $ENV{JAVA_HOME})
if (NOT DEFINED JAVA_HOME)
# Hack to get system to search for Java itself.
set(JAVA_HOME "/usr")
endif()

set(ANTLR4 ${JAVA_HOME}/bin/java -jar ${ANTLR4JAR})
endif()

find_antlr(${USE_ANTLR})
if(ANTLR4)

set(RELAY_PARSER_DIR
Expand Down
48 changes: 48 additions & 0 deletions cmake/modules/OpenMP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

# OpenMP Module
if(USE_OPENMP STREQUAL "gnu")
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
list(APPEND TVM_RUNTIME_LINKER_LIBS ${OpenMP_CXX_LIBRARIES})
add_definitions(-DTVM_THREADPOOL_USE_OPENMP=1)
message(STATUS "Build with OpenMP ${OpenMP_CXX_LIBRARIES}")
else()
add_definitions(-DTVM_THREADPOOL_USE_OPENMP=0)
message(WARNING "OpenMP cannot be found, use TVM threadpool instead.")
endif()
elseif(USE_OPENMP STREQUAL "intel")
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if (MSVC)
find_library(OMP_LIBRARY NAMES libiomp5md)
else()
find_library(OMP_LIBRARY NAMES iomp5)
endif()
list(APPEND TVM_RUNTIME_LINKER_LIBS ${OMP_LIBRARY})
add_definitions(-DTVM_THREADPOOL_USE_OPENMP=1)
message(STATUS "Build with OpenMP " ${OMP_LIBRARY})
else()
add_definitions(-DTVM_THREADPOOL_USE_OPENMP=0)
message(WARNING "OpenMP cannot be found, use TVM threadpool instead.")
endif()
else()
add_definitions(-DTVM_THREADPOOL_USE_OPENMP=0)
endif()
65 changes: 65 additions & 0 deletions cmake/util/FindANTLR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

#######################################################
# Enhanced version of find ANTLR.
#
# Usage:
# find_antlr(${USE_ANTLR})
#
# - When USE_ANTLR=ON, use auto search by first trying to find antlr4 program,
# then trying to find antlr-*-complete.jar
# - When USE_ANTLR=/path/to/antlr-*-complete.jar, use provided jar
#
# Provide variables:
# - ANTLR4
#
macro(find_antlr use_antlr)
set(JAVA_HOME $ENV{JAVA_HOME})
if (NOT DEFINED JAVA_HOME)
# Hack to get system to search for Java itself.
message(STATUS "JAVA_HOME is not defined. Set it to ensure proper use")
set(JAVA_HOME "/usr")
endif()
if(MSVC)
set(JAVA_PROGRAM ${JAVA_HOME}/java.exe)
else()
set(JAVA_PROGRAM ${JAVA_HOME}/bin/java)
endif()
message(STATUS "Using Java at " ${JAVA_PROGRAM})

if (${use_antlr} STREQUAL "ON")
find_program(ANTLR4 antlr4)
if (NOT ANTLR4)
file(GLOB_RECURSE ANTLR4JAR
/usr/local/lib/antlr-*-complete.jar
/usr/local/Cellar/*antlr-*-complete.jar)

# Get the first element of the list of antlr jars.
# Sort and reverse the list so the item selected is the highest
# version in lib or else in Cellar if no lib installation exists.
list(SORT ANTLR4JAR)
list(REVERSE ANTLR4JAR)
list(GET ANTLR4JAR 0 ANTLR4JAR)

set(ANTLR4 ${JAVA_PROGRAM} -jar ${ANTLR4JAR})
endif()
elseif(NOT ${use_antlr} STREQUAL "OFF")
set(ANTLR4 ${JAVA_PROGRAM} -jar ${use_antlr})
endif()
message(STATUS "ANTLR4="${ANTLR4})
endmacro(find_antlr)
11 changes: 7 additions & 4 deletions docker/install/ubuntu_install_nnpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand All @@ -22,11 +22,14 @@ set -o pipefail

apt-get update && apt-get install -y --no-install-recommends git cmake

# TODO: specific tag?
git clone https://github.com/Maratyszcza/NNPACK NNPACK
git clone https://github.com/Maratyszcza/pthreadpool NNPACK/pthreadpool

# Use specific versioning tag.
(cd NNPACK && git checkout 1e005b0c2)
(cd NNPACK/pthreadpool && git checkout 13da0b4c)

mkdir -p NNPACK/build
cd NNPACK/build
cmake -DCMAKE_INSTALL_PREFIX:PATH=. -DNNPACK_INFERENCE_ONLY=OFF -DNNPACK_CONVOLUTION_ONLY=OFF -DNNPACK_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && make -j4 && make install
cmake -DCMAKE_INSTALL_PREFIX:PATH=. -DNNPACK_INFERENCE_ONLY=OFF -DNNPACK_CONVOLUTION_ONLY=OFF -DNNPACK_BUILD_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DPTHREADPOOL_SOURCE_DIR=pthreadpool .. && make -j4 && make install
cd -
3 changes: 1 addition & 2 deletions docker/install/ubuntu_install_onnx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ pip3 install onnx==1.5.0
# not expose that in the wheel!!!
pip3 install future

pip3 install https://download.pytorch.org/whl/cu80/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
pip3 install torchvision
pip3 install torch==1.2.0 torchvision==0.4.0
10 changes: 5 additions & 5 deletions docs/dev/virtual_machine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ AllocTensor
Allocate a tensor value of the appropriate shape (stored in `shape_register`) and `dtype`. The result
is saved to register `dst`.

AllocDatatype
AllocADT
^^^^^^^^^^^^^
**Arguments**:
::
Expand Down Expand Up @@ -176,7 +176,7 @@ GetTagi
RegName object
RegName dst

Get the object tag for Datatype object in register `object`. And saves the reult to register `dst`.
Get the object tag for ADT object in register `object`. And saves the reult to register `dst`.

Fatal
^^^^^
Expand Down Expand Up @@ -251,9 +251,9 @@ Currently, we support 3 types of objects: tensors, data types, and closures.

::

VMObject VMTensor(const tvm::runtime::NDArray& data);
VMObject VMDatatype(size_t tag, const std::vector<VMObject>& fields);
VMObject VMClosure(size_t func_index, std::vector<VMObject> free_vars);
Object Tensor(const tvm::runtime::NDArray& data);
Object ADT(size_t tag, const std::vector<Object>& fields);
Object Closure(size_t func_index, std::vector<Object> free_vars);


Stack and State
Expand Down
53 changes: 0 additions & 53 deletions docs/frontend/tensorflow.md

This file was deleted.

Loading