Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mbrookhart/dynami…
Browse files Browse the repository at this point in the history
…c_onnx
  • Loading branch information
Matthew Brookhart committed Sep 25, 2020
2 parents 78d3ff5 + 5402642 commit 664a055
Show file tree
Hide file tree
Showing 138 changed files with 2,299 additions and 849 deletions.
31 changes: 20 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ tvm_option(USE_ARM_COMPUTE_LIB_GRAPH_RUNTIME "Build with Arm Compute Library gra
# include directories
include_directories(${CMAKE_INCLUDE_PATH})
include_directories("include")
include_directories(${DLPACK_PATH})
include_directories(${DMLC_PATH})
include_directories(${RANG_PATH})
include_directories(${COMPILER_RT_PATH})
include_directories(${PICOJSON_PATH})
include_directories(SYSTEM ${DLPACK_PATH})
include_directories(SYSTEM ${DMLC_PATH})
include_directories(SYSTEM ${RANG_PATH})
include_directories(SYSTEM ${COMPILER_RT_PATH})
include_directories(SYSTEM ${PICOJSON_PATH})

# initial variables
set(TVM_LINKER_LIBS "")
Expand Down Expand Up @@ -123,14 +123,15 @@ if(MSVC)
# DLL interface warning in c++
add_compile_options(/wd4251)
else(MSVC)
set(WARNING_FLAG -Wall)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
message(STATUS "Build in Debug mode")
set(CMAKE_C_FLAGS "-O0 -g -Wall -fPIC ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-O0 -g -Wall -fPIC ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "-O0 -g ${WARNING_FLAG} -fPIC ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-O0 -g ${WARNING_FLAG} -fPIC ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_FLAGS "-O0 -g -Xcompiler=-Wall -Xcompiler=-fPIC ${CMAKE_CUDA_FLAGS}")
else()
set(CMAKE_C_FLAGS "-O2 -Wall -fPIC ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-O2 -Wall -fPIC ${CMAKE_CXX_FLAGS}")
set(CMAKE_C_FLAGS "-O2 ${WARNING_FLAG} -fPIC ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-O2 ${WARNING_FLAG} -fPIC ${CMAKE_CXX_FLAGS}")
set(CMAKE_CUDA_FLAGS "-O2 -Xcompiler=-Wall -Xcompiler=-fPIC ${CMAKE_CUDA_FLAGS}")
set(TVM_VISIBILITY_FLAG "")
if (HIDE_PRIVATE_SYMBOLS)
Expand All @@ -142,6 +143,7 @@ else(MSVC)
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
set(CMAKE_CXX_FLAGS "-faligned-new ${CMAKE_CXX_FLAGS}")
endif()
include(cmake/modules/ClangFlags.cmake)

# Detect if we're compiling for Hexagon.
set(TEST_FOR_HEXAGON_CXX
Expand Down Expand Up @@ -365,6 +367,13 @@ set_property(TARGET tvm APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAGS}")
add_library(tvm_runtime SHARED $<TARGET_OBJECTS:tvm_runtime_objs>)
set_property(TARGET tvm_runtime APPEND PROPERTY LINK_OPTIONS "${TVM_VISIBILITY_FLAGS}")

if(USE_MICRO)
# NOTE: cmake doesn't track dependencies at the file level across subdirectories. For the
# Unix Makefiles generator, need to add these explicit target-level dependency)
add_dependencies(tvm host_standalone_crt)
add_dependencies(tvm_runtime host_standalone_crt)
endif()

if(USE_CPP_RPC)
add_subdirectory("apps/cpp_rpc")
endif()
Expand All @@ -390,7 +399,7 @@ if(BUILD_FOR_HEXAGON)
set_target_properties(tvm_runtime PROPERTIES LINK_FLAGS
"-Wl,--wrap=pthread_create")

target_include_directories(tvm_runtime
target_include_directories(tvm_runtime SYSTEM
PUBLIC "${USE_HEXAGON_SDK}/libs/common/qurt/ADSPv62MP/include/posix"
PUBLIC "${USE_HEXAGON_SDK}/libs/common/qurt/ADSPv62MP/include/qurt"
PUBLIC "${USE_HEXAGON_SDK}/incs"
Expand Down Expand Up @@ -453,7 +462,7 @@ if(GTEST_INCLUDE_DIR AND GTEST_LIB)
string(REPLACE ".cc" "" __execname ${__srcname})
add_executable(${__execname} ${__srcpath})
list(APPEND TEST_EXECS ${__execname})
target_include_directories(${__execname} PUBLIC ${GTEST_INCLUDE_DIR})
target_include_directories(${__execname} SYSTEM PUBLIC ${GTEST_INCLUDE_DIR})
target_link_libraries(${__execname} ${TVM_TEST_LIBRARY_NAME} ${GTEST_LIB} pthread dl)
set_target_properties(${__execname} PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(${__execname} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
Expand Down
19 changes: 18 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,19 @@ def init_git_win() {
}
}

def cancel_previous_build() {
// cancel previous build if it is not on master.
if (env.BRANCH_NAME != "master") {
def buildNumber = env.BUILD_NUMBER as int
// Milestone API allows us to cancel previous build
// with the same milestone number
if (buildNumber > 1) milestone(buildNumber - 1)
milestone(buildNumber)
}
}

cancel_previous_build()

stage("Sanity Check") {
timeout(time: max_time, unit: 'MINUTES') {
node('CPU') {
Expand All @@ -112,7 +125,11 @@ def make(docker_type, path, make_flag) {
sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}"
// always run cpp test when build
sh "${docker_run} ${docker_type} ./tests/scripts/task_cpp_unittest.sh"
} catch (exc) {
} catch (hudson.AbortException ae) {
// script exited due to user abort, directly throw instead of retry
if (ae.getMessage().contains('script returned exit code 143')) {
throw ae
}
echo 'Incremental compilation failed. Fall back to build from scratch'
sh "${docker_run} ${docker_type} ./tests/scripts/task_clean.sh ${path}"
sh "${docker_run} ${docker_type} ./tests/scripts/task_build.sh ${path} ${make_flag}"
Expand Down
58 changes: 58 additions & 0 deletions KEYS
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,61 @@ N8yATW8CRIKO3IobUfLMDdPCLO7uzoW95cI35Y0l8JgK2NeU6tVZptP5mDogeAbq
8PlimrXuzG9Bokct2SOO6Z51i6rSDo/ALj440EvWNw==
=1xfH
-----END PGP PUBLIC KEY BLOCK-----
pub rsa4096 2020-09-24 [SC]
6A0D4938D8C052C759AE2460ED03B26E4FC3509F
uid [ultimate] Ziheng Jiang <ziheng@apache.org>
sig 3 ED03B26E4FC3509F 2020-09-24 Ziheng Jiang <ziheng@apache.org>
sub rsa4096 2020-09-24 [E]
sig ED03B26E4FC3509F 2020-09-24 Ziheng Jiang <ziheng@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF9tEiUBEAC90om00alNSupM78ZZYMdwKZnJLIhAD22YARntVNVBuD9Znpuo
BAYwjrWdAi/npwN+r+Pd7Oz6fMBCmB3e4tsrPnBzauGb6aKgjBMHcVEx0p1197kk
WcGuKt4FNlHYfmc2sOOQre2GcIVOU1XuK8tAhgca78aorAlMtOqq+/ASnKcjRSjW
0AOzlEKfaGVgst2UO7Fc/w59S3/qv1vBGKnlqLvsJU7kNR1gFotqsGAee5Vu7alQ
WiHFJbW9ujLTPu7m8enFVuBGFkPsW89Yl/0mXnAKZFFNCHIQ9gkT+1bvZhx8ViJL
4UeqG7wnSLSSIQz2UPBJYV5stxNtd9HS08Tfviv37shd1SSprFLoQDk87j7wF60b
AR5IjbVgdprpmVNncO5pnyZwXXWVi7ZyiMSaW6wg+lkeQMGflxgL+05xOafJYgO6
UepXqu1mc7Q4eVUyft/EPmdyvlg7Fo4T4Db2PnstonkZCyLogdaaJRuxCc0AR/O1
oNaodrdjqydXVnP3d/gJ5gj78zeMPVbGbzwhpIwhfDouxftaU5zc6prBsMgY/os6
XMe9bNZWpOLXZrmo/ovaiebmxT5ZYuFRGdeRl1/Y5CWE6Q9JM8euwKuskNQ4G0aY
fVQ61Cxg4hmrnsv9YFAjf9PPWhpFHvILQoGSs3HbJCLFPphKf37gzfiZMQARAQAB
tCBaaWhlbmcgSmlhbmcgPHppaGVuZ0BhcGFjaGU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QrC7jyvfY9t8
Elf2ReXYVK/jGUePdDFurp+3KFlAHFuen2VZTcNZaUWoYoI84VDEh8/oPEPfzveJ
/GhL5vbglB0H0aG8SVMaTfzr+nXHUVyOSrlYYk34O7bSimVrX6XDGPZpsXE=
=nhJ/
-----END PGP PUBLIC KEY BLOCK-----
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[Community](https://tvm.apache.org/community) |
[Release Notes](NEWS.md)

[![Build Status](https://ci.tvm.ai/buildStatus/icon?job=tvm/master)](https://ci.tvm.ai/job/tvm/job/master/)
[![Build Status](https://ci.tlcpack.ai/buildStatus/icon?job=tvm/master)](https://ci.tlcpack.ai/job/tvm/job/master/)
[![WinMacBuild](https://github.com/apache/incubator-tvm/workflows/WinMacBuild/badge.svg)](https://github.com/apache/incubator-tvm/actions?query=workflow%3AWinMacBuild)

Apache TVM (incubating) is a compiler stack for deep learning systems. It is designed to close the gap between the
Expand Down
4 changes: 2 additions & 2 deletions apps/tf_tvmdsoop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ set(BUILD_TVMDSOOP_ONLY ON)
set(CMAKE_CURRENT_SOURCE_DIR ${TVM_ROOT})
set(CMAKE_CURRENT_BINARY_DIR ${TVM_ROOT}/build)

include_directories(${TVM_ROOT}/3rdparty/dlpack/include/)
include_directories(${TVM_ROOT}/3rdparty/dmlc-core/include/)
include_directories(SYSTEM ${TVM_ROOT}/3rdparty/dlpack/include/)
include_directories(SYSTEM ${TVM_ROOT}/3rdparty/dmlc-core/include/)
include_directories(${TVM_ROOT}/include)

link_directories(${TVM_ROOT}/build)
Expand Down
11 changes: 0 additions & 11 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,6 @@ set(USE_OPENGL OFF)
# Whether enable MicroTVM runtime
set(USE_MICRO OFF)

# Whether to enable SGX runtime
#
# Possible values for USE_SGX:
# - /path/to/sgxsdk: path to Intel SGX SDK
# - OFF: disable SGX
#
# SGX_MODE := HW|SIM
set(USE_SGX OFF)
set(SGX_MODE "SIM")
set(RUST_SGX_SDK "/path/to/rust-sgx-sdk")

# Whether enable RPC runtime
set(USE_RPC ON)

Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/CUDA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ find_cuda(${USE_CUDA})
if(CUDA_FOUND)
# always set the includedir when cuda is available
# avoid global retrigger of cmake
include_directories(${CUDA_INCLUDE_DIRS})
include_directories(SYSTEM ${CUDA_INCLUDE_DIRS})
endif(CUDA_FOUND)

if(USE_CUDA)
Expand Down
87 changes: 87 additions & 0 deletions cmake/modules/ClangFlags.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 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.

# If we are running clang >= 10.0 then enable more checking. Some of these warnings may not exist
# in older versions of clang so we limit the use of older clang for these checks.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE clang_full_version)
string (REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION ${clang_full_version})
message(STATUS "CLANG_VERSION ${CLANG_VERSION}")
if (CLANG_VERSION VERSION_GREATER_EQUAL 10.0)
message(STATUS "Setting enhanced clang warning flags")

# These warnings are only enabled when clang's -Weverything flag is enabled
# but there is no harm in turning them off for all cases.
add_compile_options(
-Wno-c++98-compat
-Wno-c++98-compat-extra-semi
-Wno-c++98-compat-pedantic
-Wno-padded
-Wno-extra-semi
-Wno-extra-semi-stmt
-Wno-unused-parameter
-Wno-sign-conversion
-Wno-weak-vtables
-Wno-deprecated-copy-dtor
-Wno-global-constructors
-Wno-double-promotion
-Wno-float-equal
-Wno-missing-prototypes
-Wno-implicit-int-float-conversion
-Wno-implicit-float-conversion
-Wno-implicit-int-conversion
-Wno-float-conversion
-Wno-shorten-64-to-32
-Wno-covered-switch-default
-Wno-unused-exception-parameter
-Wno-return-std-move-in-c++11
-Wno-over-aligned
-Wno-undef
-Wno-inconsistent-missing-destructor-override
-Wno-unreachable-code
-Wno-deprecated-copy
-Wno-implicit-fallthrough
-Wno-unreachable-code-return
-Wno-non-virtual-dtor
)

# Here we have non-standard warnings that clang has available and are useful
# so enable them if we are using clang.
add_compile_options(
-Wreserved-id-macro
-Wused-but-marked-unused
-Wdocumentation-unknown-command
-Wcast-qual
-Wzero-as-null-pointer-constant

# These warnings should be enabled one at a time and fixed.
# To enable one of these warnings remove the `no-` after -W so
# -Wno-documentation -> -Wdocumentation
-Wno-documentation
-Wno-shadow-uncaptured-local
-Wno-shadow-field-in-constructor
-Wno-shadow
-Wno-shadow-field
-Wno-exit-time-destructors
-Wno-switch-enum
-Wno-old-style-cast
-Wno-gnu-anonymous-struct
-Wno-nested-anon-types
)

endif ()
endif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
10 changes: 5 additions & 5 deletions cmake/modules/Hexagon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if(USE_HEXAGON_DEVICE STREQUAL "${PICK_SIM}")
find_hexagon_toolchain()
message(STATUS "Hexagon toolchain: ${HEXAGON_TOOLCHAIN}")
file(GLOB RUNTIME_HEXAGON_SIM_SRCS src/runtime/hexagon/sim/*.cc)
include_directories("${HEXAGON_TOOLCHAIN}/include/iss")
include_directories(SYSTEM "${HEXAGON_TOOLCHAIN}/include/iss")
link_directories("${HEXAGON_TOOLCHAIN}/lib/iss")
list(APPEND TVM_RUNTIME_LINKER_LIBS "-lwrapper")
ExternalProject_Add(sim_dev
Expand All @@ -91,11 +91,11 @@ elseif(USE_HEXAGON_DEVICE STREQUAL "${PICK_HW}")
find_hexagon_toolchain()
message(STATUS "Hexagon SDK: ${HEXAGON_SDK_ROOT}")
file(GLOB RUNTIME_HEXAGON_DEVICE_SRCS src/runtime/hexagon/target/*.cc)
include_directories("${HEXAGON_SDK_ROOT}/incs/stddef")
include_directories("${HEXAGON_SDK_ROOT}/libs/common/rpcmem/inc")
include_directories(SYSTEM "${HEXAGON_SDK_ROOT}/incs/stddef")
include_directories(SYSTEM "${HEXAGON_SDK_ROOT}/libs/common/rpcmem/inc")
include_directories(
"${HEXAGON_SDK_ROOT}/libs/common/remote/ship/android_Release_aarch64")
include_directories("${HEXAGON_TOOLCHAIN}/include/iss")
SYSTEM "${HEXAGON_SDK_ROOT}/libs/common/remote/ship/android_Release_aarch64")
include_directories(SYSTEM "${HEXAGON_TOOLCHAIN}/include/iss")
list(APPEND TVM_RUNTIME_LINKER_LIBS "dl")
if(BUILD_FOR_ANDROID)
# Hexagon runtime uses __android_log_print, which is in liblog.
Expand Down
6 changes: 4 additions & 2 deletions cmake/modules/LLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
# LLVM rules
add_definitions(-DDMLC_USE_FOPEN64=0)

if(NOT USE_LLVM STREQUAL "OFF")
# Test if ${USE_LLVM} is not an explicit boolean false
# It may be a boolean or a string
if(NOT ${USE_LLVM} MATCHES ${IS_FALSE_PATTERN})
find_llvm(${USE_LLVM})
include_directories(${LLVM_INCLUDE_DIRS})
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
message(STATUS "Build with LLVM " ${LLVM_PACKAGE_VERSION})
message(STATUS "Set TVM_LLVM_VERSION=" ${TVM_LLVM_VERSION})
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/OpenCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ find_opencl(${USE_OPENCL})
if(OpenCL_FOUND)
# always set the includedir when cuda is available
# avoid global retrigger of cmake
include_directories(${OpenCL_INCLUDE_DIRS})
include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS})
endif(OpenCL_FOUND)

if(USE_SDACCEL)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/ROCM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ find_rocm(${USE_ROCM})
if(ROCM_FOUND)
# always set the includedir
# avoid global retrigger of cmake
include_directories(${ROCM_INCLUDE_DIRS})
include_directories(SYSTEM ${ROCM_INCLUDE_DIRS})
add_definitions(-D__HIP_PLATFORM_HCC__=1)
endif(ROCM_FOUND)

Expand Down
10 changes: 5 additions & 5 deletions cmake/modules/VTA.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ elseif(PYTHON)
list(APPEND FSIM_RUNTIME_SRCS ${VTA_HW_PATH}/src/vmem/virtual_memory.cc)
# Target lib: vta_fsim
add_library(vta_fsim SHARED ${FSIM_RUNTIME_SRCS})
target_include_directories(vta_fsim PUBLIC ${VTA_HW_PATH}/include)
target_include_directories(vta_fsim SYSTEM PUBLIC ${VTA_HW_PATH}/include)
foreach(__def ${VTA_DEFINITIONS})
string(SUBSTRING ${__def} 3 -1 __strip_def)
target_compile_definitions(vta_fsim PUBLIC ${__strip_def})
Expand All @@ -80,7 +80,7 @@ elseif(PYTHON)
list(APPEND TSIM_RUNTIME_SRCS ${VTA_HW_PATH}/src/vmem/virtual_memory.cc)
# Target lib: vta_tsim
add_library(vta_tsim SHARED ${TSIM_RUNTIME_SRCS})
target_include_directories(vta_tsim PUBLIC ${VTA_HW_PATH}/include)
target_include_directories(vta_tsim SYSTEM PUBLIC ${VTA_HW_PATH}/include)
foreach(__def ${VTA_DEFINITIONS})
string(SUBSTRING ${__def} 3 -1 __strip_def)
target_compile_definitions(vta_tsim PUBLIC ${__strip_def})
Expand Down Expand Up @@ -116,9 +116,9 @@ elseif(PYTHON)
target_link_libraries(vta ${__cma_lib})
elseif(${VTA_TARGET} STREQUAL "de10nano") # DE10-Nano rules
#target_compile_definitions(vta PUBLIC VTA_MAX_XFER=2097152) # (1<<21)
target_include_directories(vta PUBLIC ${VTA_HW_PATH}/src/de10nano)
target_include_directories(vta PUBLIC 3rdparty)
target_include_directories(vta PUBLIC
target_include_directories(vta SYSTEM PUBLIC ${VTA_HW_PATH}/src/de10nano)
target_include_directories(vta SYSTEM PUBLIC 3rdparty)
target_include_directories(vta SYSTEM PUBLIC
"/usr/local/intelFPGA_lite/18.1/embedded/ds-5/sw/gcc/arm-linux-gnueabihf/include")
endif()
endif()
Expand Down
Loading

0 comments on commit 664a055

Please sign in to comment.