Skip to content

Commit

Permalink
Add QuRT thread pool backend
Browse files Browse the repository at this point in the history
  • Loading branch information
supersat committed Apr 29, 2022
2 parents 53ef297 + e23a1b8 commit 24f14f7
Show file tree
Hide file tree
Showing 372 changed files with 19,210 additions and 9,610 deletions.
14 changes: 13 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ github:
# participation, permission is given on a three month
# cycle. PMC may review and recycle slots when necessary.
collaborators:
- hpanda-naut
- denise-k
- tvm-bot # For automated feedback in PR review.
- driazati
- tvm-bot # For automated feedback in PR review.

# See https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-Branchprotection
protected_branches:
main:
required_status_checks:
contexts:
# Require a passing run from Jenkins
- tvm-ci/pr-head

required_pull_request_reviews:
required_approving_review_count: 1
1 change: 1 addition & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ runs:
environment-file: conda/build-environment.yaml
auto-activate-base: false
use-only-tar-bz2: true
python-version: 3.7
- name: Conda info
shell: pwsh
run: |
Expand Down
35 changes: 22 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ tvm_option(USE_SPIRV_KHR_INTEGER_DOT_PRODUCT "whether enable SPIRV_KHR_DOT_PRODU
tvm_option(USE_METAL "Build with Metal" OFF)
tvm_option(USE_ROCM "Build with ROCM" OFF)
tvm_option(ROCM_PATH "The path to rocm" /opt/rocm)
tvm_option(USE_HEXAGON_DEVICE "Build with Hexagon device support in TVM runtime" OFF)
tvm_option(USE_HEXAGON_SDK "Path to the Hexagon SDK root (required for Hexagon support in TVM runtime or for building TVM runtime for Hexagon)" /path/to/sdk)
tvm_option(USE_HEXAGON "Build with Hexagon support" OFF)
tvm_option(USE_HEXAGON_SDK "Path to the Hexagon SDK root (required for Hexagon support)" /path/to/sdk)
tvm_option(USE_HEXAGON_RPC "Enable Hexagon RPC using minRPC implementation over Android." OFF)
tvm_option(USE_RPC "Build with RPC" ON)
tvm_option(USE_THREADS "Build with thread support" ON)
Expand Down Expand Up @@ -320,17 +320,7 @@ tvm_file_glob(GLOB RUNTIME_SRCS
)

if(BUILD_FOR_HEXAGON)
# Add file implementing posix_memalign when building the runtime as
# a shared library.
# This function is actually defined in the static libc, but when linking
# a shared library, libc is not linked into it. Some runtime systems
# don't implement posix_runtime, which causes runtime failires.
# To avoid this issue, Hexagon runtime contains an implementation of
# posix_memalign, but it should only be used with the dynamic TVM
# runtime, since it would cause multiple definition errors with the
# static one.
if(NOT BUILD_STATIC_RUNTIME)
list(APPEND RUNTIME_SRCS src/runtime/hexagon/android/hexagon_posix.cc)
# Allow undefined symbols (there will be some from libc).
set(TVM_NO_UNDEFINED_SYMBOLS "")
endif()
Expand Down Expand Up @@ -431,6 +421,25 @@ if(USE_GTEST)
find_package(GTest REQUIRED)
endif()
if(GTEST_FOUND)
if(NOT TARGET GTest::gmock)
# GMock is formally supported in CMake 3.20; for now, expect libgmock.a in the same directory,
# and require that folks compiling against GTest::gmock also link against GTest::GTest
# (for the includes dir).
add_library(GTest::gmock STATIC IMPORTED GLOBAL)
get_target_property(GTEST_LIB_PATH GTest::GTest IMPORTED_LOCATION)
if("${GTEST_LIB_PATH}" STREQUAL "GTEST_LIB_PATH-NOTFOUND")
# CMake >= 3.20 makes GTest::GTest into a compatibility target. The real import location is in
# GTest::gtest.
get_target_property(GTEST_LIB_PATH GTest::gtest IMPORTED_LOCATION)
if("${GTEST_LIB_PATH}" STREQUAL "GTEST_LIB_PATH-NOTFOUND")
message(FATAL_ERROR "Neither GTest::GTest nor GTets::gtest targets defined IMPORTED_LOCATION")
endif()
endif()
get_filename_component(GTEST_LIB_DIR "${GTEST_LIB_PATH}" DIRECTORY)
set_target_properties(GTest::gmock PROPERTIES
IMPORTED_LOCATION "${GTEST_LIB_DIR}/libgmock.a")
endif()

enable_testing()
include(CTest)
endif()
Expand Down Expand Up @@ -626,7 +635,7 @@ if(GTEST_FOUND)
add_executable(cpptest ${TEST_SRCS})
# include runtime files for unit testing
target_include_directories(cpptest PUBLIC "src/runtime")
target_link_libraries(cpptest PRIVATE ${TVM_TEST_LIBRARY_NAME} GTest::GTest GTest::Main pthread dl)
target_link_libraries(cpptest PRIVATE ${TVM_TEST_LIBRARY_NAME} GTest::GTest GTest::Main GTest::gmock pthread dl)
set_target_properties(cpptest PROPERTIES EXCLUDE_FROM_ALL 1)
set_target_properties(cpptest PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
# For some reason, compile definitions are not propagated correctly, so we manually add them here
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ We do encourage everyone to work anything they are interested in.
- [Mehrdad Hessar](https://github.com/mehrdadh): @mehrdadh - microTVM, hexagon
- [Bohan Hou](https://github.com/spectrometerHBH): @spectrometerHBH - tir, arith, tvm-script
- [Yuwei Hu](https://github.com/Huyuwei): @Huyuwei - topi, frontends
- [Luke Hutton](https://github.com/lhutton1): @lhutton1 - ethos-u, arm
- [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
Expand Down Expand Up @@ -80,6 +81,7 @@ We do encourage everyone to work anything they are interested in.
- [Eddie Yan](https://github.com/eqy) (PMC): @eqy - runtime, autotvm, rpc, topi
- [Hao Yu](https://github.com/comaniac): @comaniac (PMC) - relay, byoc, auto_scheduler
- [Lianmin Zheng](https://github.com/merrymercy) (PMC): @merrymercy - autotvm, auto_scheduler, topi, relay
- [wrongtest](https://github.com/wrongtest): @wrongtest - tir, tvm-script, arith

## Reviewers

Expand Down Expand Up @@ -109,6 +111,7 @@ We do encourage everyone to work anything they are interested in.
- [Hua Jiang](https://github.com/huajsj): @huajsj
- [Ziheng Jiang](https://github.com/ZihengJiang): @ZihengJiang
- [Manupa Karunaratne](https://github.com/manupa-arm): @manupa-arm
- [Elen Kalda](https://github.com/ekalda): @ekalda
- [Marisa Kirisame](https://github.com/MarisaKirisame): @MarisaKirisame
- [Tristan Konolige](https://github.com/tkonolige): @tkonolige
- [Ruihang Lai](https://github.com/MasterJH5574): @MasterJH5574
Expand All @@ -132,6 +135,7 @@ We do encourage everyone to work anything they are interested in.
- [Jiawei Liu](https://github.com/ganler): @ganler
- [Lily Orth-Smith](https://github.com/electriclilies): @electriclilies
- [Wei Pan](https://github.com/wpan11nv): @wpan11nv
- [Ashutosh Parkhi](https://github.com/ashutosh-arm): @ashutosh-arm
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic
- [Pariksheet Pinjari](https://github.com/PariksheetPinjari909): @PariksheetPinjari909
- [Josh Pollock](https://github.com/joshpoll): @joshpoll
Expand Down
Loading

0 comments on commit 24f14f7

Please sign in to comment.