Skip to content

Commit 03306ef

Browse files
Merge pull request #1 from PaulPalomeroBernardo/uma
UMA
2 parents 5ecb8c3 + a609de4 commit 03306ef

File tree

759 files changed

+33249
-8558
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

759 files changed

+33249
-8558
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Jenkinsfile linguist-generated=true
2+

.github/actions/setup/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ runs:
1515
auto-activate-base: false
1616
use-only-tar-bz2: true
1717
python-version: 3.7
18+
condarc-file: conda/condarc
1819
- name: Conda info
1920
shell: pwsh
2021
run: |

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: "npm"
6+
directory: "/"
7+
schedule:
8+
interval: "monthly"
9+
open-pull-requests-limit: 0
10+
11+
- package-ecosystem: "pip"
12+
directory: "/"
13+
schedule:
14+
interval: "monthly"
15+
open-pull-requests-limit: 0

.github/workflows/main.yml

Lines changed: 117 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -38,59 +38,124 @@ jobs:
3838
MacOS:
3939
runs-on: macOS-latest
4040
steps:
41-
- uses: actions/checkout@v2
42-
with:
43-
submodules: 'recursive'
44-
- name: Set up environment
45-
uses: ./.github/actions/setup
46-
- name: Conda Build
47-
shell: bash -l {0}
48-
run: >-
49-
conda build --output-folder=conda/pkg conda/recipe &&
50-
conda install tvm -c ./conda/pkg
51-
- name: Build iOS RPC
52-
run: |
53-
IOS_VERSION="14.0"
54-
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
55-
-DCMAKE_SYSTEM_NAME=iOS \
56-
-DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
57-
-DCMAKE_OSX_SYSROOT=iphonesimulator \
58-
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
59-
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
60-
-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
61-
-DUSE_IOS_RPC=ON"
62-
63-
mkdir build-ios-simulator
64-
cd build-ios-simulator
65-
cmake .. ${CMAKE_FLAGS}
66-
cmake --build . --target ios_rpc
67-
- name: Test
68-
shell: bash -l {0}
69-
run: >-
70-
python -m pytest -v tests/python/all-platform-minimal-test
71-
- name: Test iOS RPC
72-
shell: bash -l {0}
73-
run: >-
74-
python -m pip install tornado psutil cloudpickle &&
75-
export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
76-
export BUNDLE_ID=org.apache.tvmrpc &&
77-
export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
78-
python -m pytest -v tests/python/contrib/test_rpc_server_device.py
41+
- uses: actions/checkout@v2
42+
with:
43+
submodules: 'recursive'
44+
- name: Set up environment
45+
uses: ./.github/actions/setup
46+
- name: Conda Build
47+
shell: bash -l {0}
48+
run: >-
49+
conda build --output-folder=conda/pkg conda/recipe &&
50+
conda install tvm -c ./conda/pkg
51+
- name: Build iOS RPC
52+
run: |
53+
IOS_VERSION="14.0"
54+
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
55+
-DCMAKE_SYSTEM_NAME=iOS \
56+
-DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
57+
-DCMAKE_OSX_SYSROOT=iphonesimulator \
58+
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
59+
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
60+
-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
61+
-DUSE_IOS_RPC=ON"
62+
63+
mkdir build-ios-simulator
64+
cd build-ios-simulator
65+
cmake .. ${CMAKE_FLAGS}
66+
cmake --build . --target ios_rpc
67+
- name: Test
68+
shell: bash -l {0}
69+
run: >-
70+
python -m pytest -v tests/python/all-platform-minimal-test
71+
- name: Test iOS RPC
72+
shell: bash -l {0}
73+
run: >-
74+
python -m pip install tornado psutil cloudpickle &&
75+
export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
76+
export BUNDLE_ID=org.apache.tvmrpc &&
77+
export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
78+
python -m pytest -v tests/python/contrib/test_rpc_server_device.py
7979
8080
Windows:
8181
runs-on: windows-2019
8282
steps:
83-
- uses: actions/checkout@v2
84-
with:
85-
submodules: 'recursive'
86-
- name: Set up environment
87-
uses: ./.github/actions/setup
88-
- name: Conda Build
89-
shell: cmd /C call {0}
90-
run: >-
91-
conda build --output-folder=conda/pkg conda/recipe &&
92-
conda install tvm -c ./conda/pkg
93-
- name: Test
94-
shell: cmd /C call {0}
95-
run: >-
96-
python -m pytest -v tests/python/all-platform-minimal-test
83+
- uses: actions/checkout@v2
84+
with:
85+
submodules: 'recursive'
86+
- name: Set up environment
87+
uses: ./.github/actions/setup
88+
- name: Conda Build
89+
shell: cmd /C call {0}
90+
run: >-
91+
conda build --output-folder=conda/pkg conda/recipe &&
92+
conda install tvm -c ./conda/pkg
93+
- name: Test
94+
shell: cmd /C call {0}
95+
run: >-
96+
python -m pytest -v tests/python/all-platform-minimal-test
97+
98+
Android:
99+
runs-on: Ubuntu-20.04
100+
steps:
101+
- uses: actions/checkout@v2
102+
with:
103+
submodules: 'recursive'
104+
- name: Set up environment
105+
uses: ./.github/actions/setup
106+
- name: Set up java
107+
uses: actions/setup-java@v3
108+
with:
109+
distribution: 'zulu'
110+
java-version: '11'
111+
- name: Build TVM
112+
shell: bash -l {0}
113+
run: |
114+
mkdir build
115+
cd build
116+
../tests/scripts/task_config_build_jvm.sh .
117+
cmake ..
118+
make
119+
- name: Build TVM4J
120+
run: |
121+
make jvmpkg
122+
- name: Build android_rpc
123+
working-directory: apps/android_rpc
124+
run: |
125+
export PATH="${ANDROID_NDK_HOME}:$PATH"
126+
gradle clean build
127+
- name: Upload android_rpc APK
128+
uses: actions/upload-artifact@v2
129+
with:
130+
name: android_rpc-debug.apk
131+
path: ./apps/android_rpc/app/build/outputs/apk/debug/app-debug.apk
132+
- name: Build android_deploy
133+
working-directory: apps/android_deploy
134+
run: |
135+
export PATH="${ANDROID_NDK_HOME}:$PATH"
136+
gradle clean build
137+
- name: Upload android_deploy APK
138+
uses: actions/upload-artifact@v2
139+
with:
140+
name: android_deploy-debug.apk
141+
path: ./apps/android_deploy/app/build/outputs/apk/debug/app-debug.apk
142+
- name: Build android_camera
143+
working-directory: apps/android_camera
144+
run: |
145+
mkdir -p app/src/main/assets/models/
146+
export TVM_NDK_CC=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++
147+
export TVM_HOME=~/work/tvm/tvm
148+
export PYTHONPATH=$TVM_HOME/python:${PYTHONPATH}
149+
python3 ${TVM_HOME}/python/gen_requirements.py
150+
pip3 install -r ${TVM_HOME}/python/requirements/core.txt
151+
cd models
152+
pip3 install -r requirements.txt
153+
python3 prepare_model.py
154+
cd ..
155+
export PATH="${ANDROID_NDK_HOME}:$PATH"
156+
gradle clean build
157+
- name: Upload android_camera APK
158+
uses: actions/upload-artifact@v2
159+
with:
160+
name: android_camera-debug.apk
161+
path: ./apps/android_camera/app/build/outputs/apk/debug/app-debug.apk

.github/workflows/merge.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
name: Merge
3+
on:
4+
status:
5+
pull_request_review:
6+
types:
7+
- submitted
8+
issue_comment:
9+
10+
concurrency:
11+
group: merge-${{ github.event.pull_request.number }}-${{ github.event.issue.number }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
maybe-merge:
16+
if: github.repository == 'apache/tvm'
17+
runs-on: ubuntu-20.04
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Merge if requested and possible
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
PR_NUMBER: ${{ github.event.issue.number }}
24+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
25+
run: |
26+
set -eux
27+
python tests/scripts/github_mergebot.py --pr "$PR_NUMBER" --run-url "$RUN_URL"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,5 @@ tvm-site/
263263
# Generated docs files
264264
gallery/how_to/work_with_microtvm/micro_tvmc.py
265265

266+
# Test sample data files
267+
!tests/python/ci/sample_prs/*.json

CMakeLists.txt

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ list(APPEND COMPILER_SRCS "src/target/datatype/myfloat/myfloat.cc")
318318
tvm_file_glob(GLOB RUNTIME_SRCS
319319
src/runtime/*.cc
320320
src/runtime/vm/*.cc
321+
src/runtime/minrpc/*.cc
321322
)
322323

323324
if(BUILD_FOR_HEXAGON)
@@ -491,6 +492,7 @@ include(cmake/modules/contrib/ArmComputeLib.cmake)
491492
include(cmake/modules/contrib/TensorRT.cmake)
492493
include(cmake/modules/contrib/VitisAI.cmake)
493494
include(cmake/modules/contrib/Verilator.cmake)
495+
include(cmake/modules/contrib/UMA.cmake)
494496
include(cmake/modules/Git.cmake)
495497
include(cmake/modules/LibInfo.cmake)
496498
include(cmake/modules/RustExt.cmake)
@@ -765,35 +767,6 @@ if(BUILD_FOR_HEXAGON)
765767
endif()
766768
endif()
767769

768-
#Caches the build.
769-
#Note that ccache-3.x doesn't support nvcc well, so CUDA kernels may never hit the cache and still
770-
#need to be re-compiled every time. Using ccache 4.0+ can resolve this issue.
771-
772-
if(USE_CCACHE) # True for AUTO, ON, /path/to/ccache
773-
if("${USE_CCACHE}" STREQUAL "AUTO") # Auto mode
774-
find_program(CCACHE_FOUND ccache)
775-
if(CCACHE_FOUND)
776-
message(STATUS "Found the path to ccache, enabling ccache")
777-
set(PATH_TO_CCACHE ccache)
778-
else()
779-
message(STATUS "Didn't find the path to CCACHE, disabling ccache")
780-
endif(CCACHE_FOUND)
781-
elseif("${USE_CCACHE}" MATCHES ${IS_TRUE_PATTERN})
782-
find_program(CCACHE_FOUND ccache)
783-
if(CCACHE_FOUND)
784-
message(STATUS "Found the path to ccache, enabling ccache")
785-
set(PATH_TO_CCACHE ccache)
786-
else()
787-
message(FATAL_ERROR "Cannot find ccache. Set USE_CCACHE mode to AUTO or OFF to build without ccache. USE_CCACHE=" "${USE_CCACHE}")
788-
endif(CCACHE_FOUND)
789-
else() # /path/to/ccache
790-
set(PATH_TO_CCACHE USE_CCACHE)
791-
message(STATUS "Setting ccache path to " "${PATH_TO_CCACHE}")
792-
endif()
793-
# Set the flag for ccache
794-
set(CXX_COMPILER_LAUNCHER PATH_TO_CCACHE)
795-
endif(USE_CCACHE)
796-
797770
find_and_set_linker(${USE_ALTERNATIVE_LINKER})
798771

799772
if(${SUMMARIZE})

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,12 @@ We do encourage everyone to work anything they are interested in.
138138
- [Jiawei Liu](https://github.com/ganler): @ganler
139139
- [Lily Orth-Smith](https://github.com/electriclilies): @electriclilies
140140
- [Wei Pan](https://github.com/wpan11nv): @wpan11nv
141+
- [Michalis Papadimitriou](https://github.com/mikepapadim): @mikepapadim
141142
- [Ashutosh Parkhi](https://github.com/ashutosh-arm): @ashutosh-arm
142143
- [Krzysztof Parzyszek](https://github.com/kparzysz-quic): @kparzysz-quic
143144
- [Pariksheet Pinjari](https://github.com/PariksheetPinjari909): @PariksheetPinjari909
144145
- [Josh Pollock](https://github.com/joshpoll): @joshpoll
146+
- [Ramana Radhakrishnan](https://github.com/u99127): @u99127
145147
- [Andrew Reusch](https://github.com/areusch): @areusch
146148
- [David Riazati](https://github.com/driazati): @driazati
147149
- [Jared Roesch](https://github.com/jroesch): @jroesch

0 commit comments

Comments
 (0)