Skip to content

Commit 876f7a8

Browse files
author
Matthew Brookhart
authored
Merge branch 'main' into mbrookhart/scatter_cuda_schedule
2 parents 488ad3d + e997185 commit 876f7a8

File tree

472 files changed

+10466
-4034
lines changed

Some content is hidden

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

472 files changed

+10466
-4034
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ name: WinMacBuild
2424
on:
2525
push:
2626
branches:
27-
- master
27+
- main
2828

2929
pull_request:
3030
branches:
31-
- master
31+
- main
3232

3333
jobs:
3434
Build:

CMakeLists.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.2)
22
project(tvm C CXX)
33

44
# Utility functions
5-
include(cmake/util/Util.cmake)
6-
include(cmake/util/FindCUDA.cmake)
7-
include(cmake/util/FindOpenCL.cmake)
8-
include(cmake/util/FindVulkan.cmake)
9-
include(cmake/util/FindLLVM.cmake)
10-
include(cmake/util/FindROCM.cmake)
11-
include(cmake/util/FindEthosN.cmake)
5+
include(cmake/utils/Utils.cmake)
6+
include(cmake/utils/FindCUDA.cmake)
7+
include(cmake/utils/FindOpenCL.cmake)
8+
include(cmake/utils/FindVulkan.cmake)
9+
include(cmake/utils/FindLLVM.cmake)
10+
include(cmake/utils/FindROCM.cmake)
11+
include(cmake/utils/FindEthosN.cmake)
1212

1313
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/config.cmake)
1414
include(${CMAKE_CURRENT_BINARY_DIR}/config.cmake)
@@ -97,6 +97,7 @@ if(MSVC)
9797
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
9898
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
9999
add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
100+
add_definitions(-DNOMINMAX)
100101
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
101102
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
102103
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj")

Jenkinsfile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@
4545

4646
// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
4747
ci_lint = "tlcpack/ci-lint:v0.62"
48-
ci_gpu = "tlcpack/ci-gpu:v0.64"
49-
ci_cpu = "tlcpack/ci-cpu:v0.66"
48+
ci_gpu = "tlcpack/ci-gpu:v0.65"
49+
ci_cpu = "tlcpack/ci-cpu:v0.67"
5050
ci_wasm = "tlcpack/ci-wasm:v0.60"
5151
ci_i386 = "tlcpack/ci-i386:v0.52"
52+
ci_qemu = "tlcpack/ci-qemu:v0.01"
5253
// <--- End of regex-scanned config.
5354

5455
// tvm libraries
@@ -93,8 +94,8 @@ def init_git_win() {
9394
}
9495

9596
def cancel_previous_build() {
96-
// cancel previous build if it is not on master.
97-
if (env.BRANCH_NAME != "master") {
97+
// cancel previous build if it is not on main.
98+
if (env.BRANCH_NAME != "main") {
9899
def buildNumber = env.BUILD_NUMBER as int
99100
// Milestone API allows us to cancel previous build
100101
// with the same milestone number
@@ -210,6 +211,18 @@ stage('Build') {
210211
pack_lib('i386', tvm_multilib)
211212
}
212213
}
214+
},
215+
'BUILD: QEMU': {
216+
node('CPU') {
217+
ws(per_exec_ws("tvm/build-qemu")) {
218+
init_git()
219+
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh"
220+
make(ci_qemu, 'build', '-j2')
221+
timeout(time: max_time, unit: 'MINUTES') {
222+
sh "${docker_run} ${ci_qemu} ./tests/scripts/task_python_microtvm.sh"
223+
}
224+
}
225+
}
213226
}
214227
}
215228

@@ -315,14 +328,14 @@ stage('Build packages') {
315328
}
316329
}
317330
// Here we could upload the packages to anaconda for releases
318-
// and/or the master branch
331+
// and/or the main branch
319332
}
320333
*/
321334

322335
stage('Deploy') {
323336
node('doc') {
324337
ws(per_exec_ws("tvm/deploy-docs")) {
325-
if (env.BRANCH_NAME == "master") {
338+
if (env.BRANCH_NAME == "main") {
326339
unpack_lib('mydocs', 'docs.tgz')
327340
sh "cp docs.tgz /var/docs/docs.tgz"
328341
sh "tar xf docs.tgz -C /var/docs"

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ jvminstall:
135135
mvn install -P$(JVM_PKG_PROFILE) -Dcxx="$(CXX)" \
136136
-Dcflags="$(PKG_CFLAGS)" -Dldflags="$(PKG_LDFLAGS)" \
137137
-Dcurrent_libdir="$(ROOTDIR)/$(OUTPUTDIR)" $(JVM_TEST_ARGS))
138+
format:
139+
./tests/lint/git-clang-format.sh -i origin/main
140+
black .
141+
cd rust; which cargo && cargo fmt --all; cd ..
142+
138143

139144
# clean rule
140145
clean:

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ Rust language support in TVM includes two parts. 1. The frontend wraps the curre
21902190
* Fix benchmark layout in graph tuner (#3926)
21912191
* Fix Android Demo LLVM version (#3962)
21922192
* Cast filepath arguments to string (#3968)
2193-
* Fixes "common" sub crate using nightly and master (#3965)
2193+
* Fixes "common" sub crate using nightly and main (#3965)
21942194
* Changes to make tensorize work. These changes also fix the previously broken test. (#3981)
21952195
* Remove FLOP computation when calling 3rd party library (#4005)
21962196
* Use a more intuitive way to limit the #ops in a group (#4018)
@@ -2254,7 +2254,7 @@ Rust language support in TVM includes two parts. 1. The frontend wraps the curre
22542254

22552255

22562256
### Depreciations
2257-
* Deprecating python2 support in the master branch and following release (v0.6). (#2994, #2986)
2257+
* Deprecating python2 support and following release (v0.6). (#2994, #2986)
22582258
* NNVM is deprecated and will be removed in a future version. (#4333, #4368)
22592259

22602260

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<!--- specific language governing permissions and limitations -->
1616
<!--- under the License. -->
1717

18-
<img src=https://raw.githubusercontent.com/apache/incubator-tvm-site/master/images/logo/tvm-logo-small.png width=128/> Open Deep Learning Compiler Stack
18+
<img src=https://raw.githubusercontent.com/apache/incubator-tvm-site/main/images/logo/tvm-logo-small.png width=128/> Open Deep Learning Compiler Stack
1919
==============================================
2020
[Documentation](https://tvm.apache.org/docs) |
2121
[Contributors](CONTRIBUTORS.md) |
2222
[Community](https://tvm.apache.org/community) |
2323
[Release Notes](NEWS.md)
2424

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

2828
Apache TVM (incubating) is a compiler stack for deep learning systems. It is designed to close the gap between the

apps/android_camera/app/src/main/jni/tvm_runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "../src/runtime/c_runtime_api.cc"
4141
#include "../src/runtime/cpu_device_api.cc"
4242
#include "../src/runtime/dso_library.cc"
43-
#include "../src/runtime/file_util.cc"
43+
#include "../src/runtime/file_utils.cc"
4444
#include "../src/runtime/graph/graph_runtime.cc"
4545
#include "../src/runtime/library_module.cc"
4646
#include "../src/runtime/module.cc"

apps/android_deploy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Alternatively, you may execute Docker image we provide which contains the requir
3434

3535
### Build APK
3636

37-
Before you build the Android application, please refer to [TVM4J Installation Guide](https://github.com/apache/incubator-tvm/blob/master/jvm/README.md) and install tvm4j-core to your local maven repository. You can find tvm4j dependency declare in `app/build.gradle`. Modify it if it is necessary.
37+
Before you build the Android application, please refer to [TVM4J Installation Guide](https://github.com/apache/incubator-tvm/blob/main/jvm/README.md) and install tvm4j-core to your local maven repository. You can find tvm4j dependency declare in `app/build.gradle`. Modify it if it is necessary.
3838

3939
```
4040
dependencies {
@@ -124,7 +124,7 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain-
124124

125125
Follow instruction to get compiled version model for android target [here.](https://tvm.apache.org/docs/deploy/android.html)
126126

127-
Copied these compiled model deploy_lib.so, deploy_graph.json and deploy_param.params to apps/android_deploy/app/src/main/assets/ and modify TVM flavor changes on [java](https://github.com/apache/incubator-tvm/blob/master/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java#L81)
127+
Copied these compiled model deploy_lib.so, deploy_graph.json and deploy_param.params to apps/android_deploy/app/src/main/assets/ and modify TVM flavor changes on [java](https://github.com/apache/incubator-tvm/blob/main/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java#L81)
128128

129129
`CPU Verison flavor`
130130
```

apps/android_deploy/app/src/main/jni/tvm_runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "../src/runtime/c_runtime_api.cc"
2929
#include "../src/runtime/cpu_device_api.cc"
3030
#include "../src/runtime/dso_library.cc"
31-
#include "../src/runtime/file_util.cc"
31+
#include "../src/runtime/file_utils.cc"
3232
#include "../src/runtime/graph/graph_runtime.cc"
3333
#include "../src/runtime/library_module.cc"
3434
#include "../src/runtime/module.cc"

apps/android_rpc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You will need JDK, [Android NDK](https://developer.android.com/ndk) and an Andro
2828

2929
We use [Gradle](https://gradle.org) to build. Please follow [the installation instruction](https://gradle.org/install) for your operating system.
3030

31-
Before you build the Android application, please refer to [TVM4J Installation Guide](https://github.com/apache/incubator-tvm/blob/master/jvm/README.md) and install tvm4j-core to your local maven repository. You can find tvm4j dependency declare in `app/build.gradle`. Modify it if it is necessary.
31+
Before you build the Android application, please refer to [TVM4J Installation Guide](https://github.com/apache/incubator-tvm/blob/main/jvm/README.md) and install tvm4j-core to your local maven repository. You can find tvm4j dependency declare in `app/build.gradle`. Modify it if it is necessary.
3232

3333
```
3434
dependencies {
@@ -146,7 +146,7 @@ android 1 1 0
146146
```
147147

148148

149-
Then checkout [android\_rpc/tests/android\_rpc\_test.py](https://github.com/apache/incubator-tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py) and run,
149+
Then checkout [android\_rpc/tests/android\_rpc\_test.py](https://github.com/apache/incubator-tvm/blob/main/apps/android_rpc/tests/android_rpc_test.py) and run,
150150

151151
```bash
152152
# Specify the RPC tracker
@@ -157,7 +157,7 @@ export TVM_NDK_CC=/opt/android-toolchain-arm64/bin/aarch64-linux-android-g++
157157
python android_rpc_test.py
158158
```
159159

160-
This will compile TVM IR to shared libraries (CPU, OpenCL and Vulkan) and run vector addition on your Android device. To verify compiled TVM IR shared libraries on OpenCL target set `'test_opencl = True'` and on Vulkan target set `'test_vulkan = True'` in [tests/android_rpc_test.py](https://github.com/apache/incubator-tvm/blob/master/apps/android_rpc/tests/android_rpc_test.py), by default on CPU target will execute.
160+
This will compile TVM IR to shared libraries (CPU, OpenCL and Vulkan) and run vector addition on your Android device. To verify compiled TVM IR shared libraries on OpenCL target set `'test_opencl = True'` and on Vulkan target set `'test_vulkan = True'` in [tests/android_rpc_test.py](https://github.com/apache/incubator-tvm/blob/main/apps/android_rpc/tests/android_rpc_test.py), by default on CPU target will execute.
161161
On my test device, it gives following results.
162162

163163
```bash

0 commit comments

Comments
 (0)