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

Merge from upstream #53

Merged
merged 59 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a6f37a2
[relay][vm] Separate VM runtime with executable (#4100)
zhiics Oct 17, 2019
5faa6f7
[Relay][Frontend][TF] Add tensor array ops (#3798)
wweic Oct 18, 2019
cb5277f
Fix typo (#4144)
gussmith23 Oct 18, 2019
86d445a
[CI] Pin NNPack pthreadtools version (#4152)
tqchen Oct 18, 2019
c67bb94
[QNN][TFLite] Parsing QNN Add op. Adding MobilenetV2. (#4142)
anijain2305 Oct 18, 2019
7aae836
Add lift_if_then_else pass (#3865)
kevinthesun Oct 18, 2019
909900f
[CI] Update cpu docker (#4153)
tqchen Oct 18, 2019
6f5d9f2
[Refactor] Rename Datatype to ADT (#4156)
wweic Oct 20, 2019
ffc11b7
[Runtime] Enable option to use OpenMP thread pool (#4089)
icemelon Oct 20, 2019
824e1d8
[REFACTOR][NODE][RUNTIME] Move Node to the new Object protocol. (#4161)
tqchen Oct 21, 2019
866a7cb
[CI] Move golang tests to the end (#4164)
tqchen Oct 21, 2019
ddf63c0
Add support for quantized multiply to Relay (#4141)
ekalda Oct 21, 2019
f0f80df
Fix missspelling (#4166)
monkeyking Oct 21, 2019
ea3e5b7
[Relay][Pass] Count MAC for BatchMatMul (#4157)
icemelon Oct 21, 2019
ab69254
[Relay][QNN] Add unit test for int8 (#4159)
zhiics Oct 21, 2019
7168268
[relay][vm] Reuse allocated device memory (#4170)
zhiics Oct 22, 2019
7e29f18
add missing gradient check to gradient pass (#4169)
altanh Oct 22, 2019
5f7f300
merge extract_from_program and extract_from_multiple_progam (#4173)
comaniac Oct 22, 2019
78af92b
[TOPI] Added support for Mali Bifrost target (#4047)
mbaret Oct 22, 2019
5fb518e
[Relay][Frontend][TF] Fix Size operator (#4175)
soiferj Oct 22, 2019
302abea
[Pass] Remove dead code (#4177)
wweic Oct 23, 2019
fc1ab4b
[rpc] use callback func to do send & recv (#4147)
yzhliu Oct 23, 2019
c275545
Add support and testing for tf.assert (as no-op) and tf.no_op to TF R…
broune Oct 23, 2019
45de99b
[DOCS] Add TensorFlow frontend docs (#4154)
soiferj Oct 24, 2019
4c65719
Revert "[Relay][QNN] Add unit test for int8 (#4159)" (#4192)
tqchen Oct 24, 2019
70b8cf8
[cmake][ANTLR] Support setting path to ANTLR jar (#4176)
soiferj Oct 24, 2019
15ff567
Split adaptive_pool2d_avg into sum and div (#4186)
kevinthesun Oct 24, 2019
07e3a1b
[Documentation]Fix example code in comment of tvm.build_module.build(…
optima2005 Oct 24, 2019
9341f6f
[relay] use time_evaluator for measurement (#4191)
zhiics Oct 24, 2019
ab0e24d
Add parser support for SUM tflite operator (#4182)
inadob Oct 24, 2019
7f66bd5
[Relay] Fix memory leak in the interpreter (#4155)
MarisaKirisame Oct 24, 2019
ccdd47a
[TOPI] Tunable Template for Conv2D HWCN on CUDA (#4168)
comaniac Oct 24, 2019
5884ea9
TensorCore Support using Intrinsic (#4136)
Hzfengsy Oct 24, 2019
1a11efb
[NODE][REFACTOR] Refactor reflection system in node. (#4189)
tqchen Oct 24, 2019
1df6c67
hotfix the ci (#4199)
tqchen Oct 24, 2019
19f105f
[TOPI][x86] Legalize - Support int8xint8 convolution to use VNNI inst…
anijain2305 Oct 25, 2019
3d0af15
[Relay] crossentropy_with_logits and its gradient (#4075)
MarisaKirisame Oct 25, 2019
e216d28
[hotfix] missing include headers (#4204)
zhiics Oct 25, 2019
81452aa
[Relay][Training] Add checkpoint annotation for checkpointing memory …
altanh Oct 27, 2019
d121208
[Relay][Params] Add APIs for storing and retrieving parameters from i…
jroesch Oct 27, 2019
78069a3
[Relay][Frontend][ONNX] Add support for op Where (#4184)
soiferj Oct 27, 2019
108d084
[VTA][Chisel] TSIM VTA Source Refactor (#4163)
BenjaminTu Oct 27, 2019
7e3bceb
[RUNTIME] Separate runtime related contrib into runtime/contrib (#4207)
tqchen Oct 27, 2019
51423f4
Fix type var docs (#4208)
weberlo Oct 28, 2019
7ece7e3
[Relay] Setting Legalize opt_level to 1. (#4198)
anijain2305 Oct 28, 2019
6f3be60
[TOPI] Fix flaky testcase for check round (#4211)
tqchen Oct 28, 2019
08776e4
[Relay][Op] Enhance Upsample Operator to support float scales (#4206)
Oct 28, 2019
dbc1cc7
[Relay][Quantize] Use fixed point mulplications (#4160)
vinx13 Oct 29, 2019
223351f
Update have_int8 condition to run on compute capability 7.x devices (…
vinx13 Oct 29, 2019
5879332
Optimizing autotvm task extraction speed (#4138)
fwd4 Oct 29, 2019
f0c7129
[Relay] Add Python type functor and tests (#4209)
weberlo Oct 30, 2019
a1ecdfe
Fix typo in packed_func.h (#4219)
spectrometerHBH Oct 30, 2019
0d5debe
Improve the lowering of Qnn Dense (#4213)
shoubhik Oct 30, 2019
02418d0
[ARITH] Fix the rule y < x && x <= y (#4220)
sgrechanik-h Oct 30, 2019
b23ae42
[PYTHON] Add __init__ to the generated grammar so that it can be inst…
tqchen Oct 30, 2019
f590245
[Relay][Frontend][ONNX] New Operators and Opsets to Support BERT (#4197)
jwfromm Oct 30, 2019
76c8ead
[Relay][Topi][TensorFlow][ONNX][Lang] Add support for Any op (#4205)
soiferj Oct 30, 2019
cd69b8a
Update dmlc_tvm_commit_id.txt
kevinthesun Oct 30, 2019
9b1d15b
Merge from upstream
kevinthesun Oct 30, 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
  •  
  •  
  •  
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 @@ -155,6 +157,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 @@ -234,6 +237,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 @@ -267,6 +271,7 @@ add_library(tvm_topi SHARED ${TOPI_SRCS})
add_library(tvm_runtime SHARED ${RUNTIME_SRCS})
add_library(tvm_runtime_static STATIC ${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 @@ -195,10 +201,10 @@ stage('Build') {
make(ci_cpu, 'build', '-j4')
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 Down Expand Up @@ -143,6 +147,10 @@ set(USE_SORT ON)
# /path/to/tensorrt that contains include and lib dirs
set(USE_TENSORRT OFF)
# 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
4 changes: 2 additions & 2 deletions cmake/modules/CUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ if(USE_CUDA)

if(USE_CUDNN)
message(STATUS "Build with cuDNN support")
file(GLOB CONTRIB_CUDNN_SRCS src/contrib/cudnn/*.cc)
file(GLOB CONTRIB_CUDNN_SRCS src/runtime/contrib/cudnn/*.cc)
list(APPEND RUNTIME_SRCS ${CONTRIB_CUDNN_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUDNN_LIBRARY})
include_directories(${USE_CUDNN}/include)
endif(USE_CUDNN)

if(USE_CUBLAS)
message(STATUS "Build with cuBLAS support")
file(GLOB CONTRIB_CUBLAS_SRCS src/contrib/cublas/*.cc)
file(GLOB CONTRIB_CUBLAS_SRCS src/runtime/contrib/cublas/*.cc)
list(APPEND RUNTIME_SRCS ${CONTRIB_CUBLAS_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${CUDA_CUBLAS_LIBRARY})
endif(USE_CUBLAS)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/Metal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(USE_METAL)
list(APPEND RUNTIME_SRCS ${RUNTIME_METAL_SRCS})

if(USE_MPS)
file(GLOB MPS_CONTRIB_SRC src/contrib/mps/*.mm)
file(GLOB MPS_CONTRIB_SRC src/runtime/contrib/mps/*.mm)
list(APPEND RUNTIME_SRCS ${MPS_CONTRIB_SRC})
find_library(MPS_CONTRIB_LIB MetalPerformanceShaders)
list(APPEND TVM_RUNTIME_LINKER_LIBS ${MPS_CONTRIB_LIB})
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()
4 changes: 2 additions & 2 deletions cmake/modules/ROCM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ if(USE_ROCM)

if(USE_MIOPEN)
message(STATUS "Build with MIOpen support")
file(GLOB MIOPEN_CONTRIB_SRCS src/contrib/miopen/*.cc)
file(GLOB MIOPEN_CONTRIB_SRCS src/runtime/contrib/miopen/*.cc)
list(APPEND RUNTIME_SRCS ${MIOPEN_CONTRIB_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_MIOPEN_LIBRARY})
endif(USE_MIOPEN)

if(USE_ROCBLAS)
message(STATUS "Build with RocBLAS support")
file(GLOB ROCBLAS_CONTRIB_SRCS src/contrib/rocblas/*.cc)
file(GLOB ROCBLAS_CONTRIB_SRCS src/runtime/contrib/rocblas/*.cc)
list(APPEND RUNTIME_SRCS ${ROCBLAS_CONTRIB_SRCS})
list(APPEND TVM_RUNTIME_LINKER_LIBS ${ROCM_ROCBLAS_LIBRARY})
endif(USE_ROCBLAS)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/contrib/BLAS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

# Plugin rules for cblas
file(GLOB CBLAS_CONTRIB_SRC src/contrib/cblas/*.cc)
file(GLOB CBLAS_CONTRIB_SRC src/runtime/contrib/cblas/*.cc)

if(USE_BLAS STREQUAL "openblas")
find_library(BLAS_LIBRARY openblas)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/contrib/NNPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(USE_NNPACK)
set(NNPACK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/NNPack)
endif()
set(PTHREAD_POOL_PATH ${NNPACK_PATH}/deps/pthreadpool)
file(GLOB NNPACK_CONTRIB_SRC src/contrib/nnpack/*.cc)
file(GLOB NNPACK_CONTRIB_SRC src/runtime/contrib/nnpack/*.cc)
list(APPEND RUNTIME_SRCS ${NNPACK_CONTRIB_SRC})
include_directories(${NNPACK_PATH}/include)
include_directories(${PTHREAD_POOL_PATH}/include)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/contrib/Random.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

if(USE_RANDOM)
message(STATUS "Build with contrib.random")
file(GLOB RANDOM_CONTRIB_SRC src/contrib/random/random.cc)
file(GLOB RANDOM_CONTRIB_SRC src/runtime/contrib/random/random.cc)
list(APPEND RUNTIME_SRCS ${RANDOM_CONTRIB_SRC})
endif(USE_RANDOM)
2 changes: 1 addition & 1 deletion cmake/modules/contrib/Sort.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

if(USE_SORT)
message(STATUS "Build with contrib.sort")
file(GLOB SORT_CONTRIB_SRC src/contrib/sort/*.cc)
file(GLOB SORT_CONTRIB_SRC src/runtime/contrib/sort/*.cc)
list(APPEND RUNTIME_SRCS ${SORT_CONTRIB_SRC})
endif(USE_SORT)
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)
2 changes: 1 addition & 1 deletion dmlc_tvm_commit_id.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cf046972eb5602c2d1b67edea230f6ca07c966b1
76c8ead492b7646d1c531a78314174761093510d
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 -
2 changes: 2 additions & 0 deletions docs/api/python/topi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ List of operators
topi.greater_equal
topi.less_equal
topi.all
topi.any
topi.logical_and
topi.logical_or
topi.logical_not
Expand Down Expand Up @@ -151,6 +152,7 @@ topi
.. autofunction:: topi.full
.. autofunction:: topi.full_like
.. autofunction:: topi.all
.. autofunction:: topi.any
.. autofunction:: topi.max
.. autofunction:: topi.sum
.. autofunction:: topi.min
Expand Down
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
Loading