Skip to content

Commit

Permalink
[CI] Move to use main as the default (apache#6665)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored Oct 12, 2020
1 parent 74b6922 commit 0cdd285
Show file tree
Hide file tree
Showing 87 changed files with 231 additions and 231 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def init_git_win() {
}

def cancel_previous_build() {
// cancel previous build if it is not on master.
if (env.BRANCH_NAME != "master") {
// cancel previous build if it is not on main.
if (env.BRANCH_NAME != "main") {
def buildNumber = env.BUILD_NUMBER as int
// Milestone API allows us to cancel previous build
// with the same milestone number
Expand Down Expand Up @@ -328,14 +328,14 @@ stage('Build packages') {
}
}
// Here we could upload the packages to anaconda for releases
// and/or the master branch
// and/or the main branch
}
*/

stage('Deploy') {
node('doc') {
ws(per_exec_ws("tvm/deploy-docs")) {
if (env.BRANCH_NAME == "master") {
if (env.BRANCH_NAME == "main") {
unpack_lib('mydocs', 'docs.tgz')
sh "cp docs.tgz /var/docs/docs.tgz"
sh "tar xf docs.tgz -C /var/docs"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jvminstall:
-Dcflags="$(PKG_CFLAGS)" -Dldflags="$(PKG_LDFLAGS)" \
-Dcurrent_libdir="$(ROOTDIR)/$(OUTPUTDIR)" $(JVM_TEST_ARGS))
format:
./tests/lint/git-clang-format.sh -i origin/master
./tests/lint/git-clang-format.sh -i origin/main
black .
cd rust; which cargo && cargo fmt --all; cd ..

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


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


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<!--- specific language governing permissions and limitations -->
<!--- under the License. -->

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

[![Build Status](https://ci.tlcpack.ai/buildStatus/icon?job=tvm/master)](https://ci.tlcpack.ai/job/tvm/job/master/)
[![Build Status](https://ci.tlcpack.ai/buildStatus/icon?job=tvm/main)](https://ci.tlcpack.ai/job/tvm/job/main/)
[![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/android_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Alternatively, you may execute Docker image we provide which contains the requir

### Build APK

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.
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.

```
dependencies {
Expand Down Expand Up @@ -124,7 +124,7 @@ If everything goes well, you will find compile tools in `/opt/android-toolchain-

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

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)
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)

`CPU Verison flavor`
```
Expand Down
6 changes: 3 additions & 3 deletions apps/android_rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You will need JDK, [Android NDK](https://developer.android.com/ndk) and an Andro

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

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.
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.

```
dependencies {
Expand Down Expand Up @@ -146,7 +146,7 @@ android 1 1 0
```


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,
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,

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

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.
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.
On my test device, it gives following results.

```bash
Expand Down
2 changes: 1 addition & 1 deletion apps/benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ python3 -m tvm.exec.rpc_tracker
`python3 -m tvm.exec.rpc_server --tracker=10.77.1.123:9190 --key=rk3399`, where 10.77.1.123 is the IP address of the tracker.

* For Android device
* Build and install tvm RPC apk on your device [Help](https://github.com/apache/incubator-tvm/tree/master/apps/android_rpc).
* Build and install tvm RPC apk on your device [Help](https://github.com/apache/incubator-tvm/tree/main/apps/android_rpc).
Make sure you can pass the android rpc test. Then you have alreadly known how to register.

3. Verify the device registration
Expand Down
2 changes: 1 addition & 1 deletion apps/ios_rpc/tests/ios_rpc_mobilenet.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def compile_metal(src):


def prepare_input():
img_url = "https://github.com/dmlc/mxnet.js/blob/master/data/cat.png?raw=true"
img_url = "https://github.com/dmlc/mxnet.js/blob/main/data/cat.png?raw=true"
img_name = "cat.png"
synset_url = "".join(
[
Expand Down
4 changes: 2 additions & 2 deletions apps/wasm-standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

## Motivation

<img src="https://github.com/dmlc/web-data/raw/master/tvm/tutorial/tvm_support_list.png" alt="TVM hardware support" width="600"/>
<img src="https://github.com/dmlc/web-data/raw/main/tvm/tutorial/tvm_support_list.png" alt="TVM hardware support" width="600"/>

As demonstrated in TVM runtime [tutorials](https://tvm.apache.org/docs/tutorials/get_started/relay_quick_start.html), TVM already supports WASM as the optional hardware backend, so we can leverage the features of WebAssembly (portability, security) and TVM runtime (domain-specific, optimization) to build a flexible and auto-optimized graph compiler for all deep learning frameworks.

Expand Down Expand Up @@ -165,7 +165,7 @@ Options:
Next perform model inference using these commands below:
```
$ cp ../../../wasm-graph/lib/wasm_graph_resnet50.wasm ./
$ wget -O cat.png https://github.com/dmlc/mxnet.js/blob/master/data/cat.png?raw=true
$ wget -O cat.png https://github.com/dmlc/mxnet.js/blob/main/data/cat.png?raw=true
$ wget -O synset.csv https://raw.githubusercontent.com/kazum/tvm-wasm/master/synset.csv
$ ./target/debug/test_graph_resnet50 -g ./wasm_graph_resnet50.wasm -i ./cat.png -l ./synset.csv
original image dimensions: (256, 256)
Expand Down
4 changes: 2 additions & 2 deletions docker/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function run_lint_step() {
# NOTE: need to run git status to update some docker-side cache. Otherwise,
# git-clang-format will fail with "The following files would be modified but have
# unstaged changes:"
cmd=( bash -c 'git status &>/dev/null && tests/lint/git-clang-format.sh -i origin/master' )
cmd=( bash -c 'git status &>/dev/null && tests/lint/git-clang-format.sh -i origin/main' )
fi
;;
cpplint)
Expand All @@ -58,7 +58,7 @@ function run_lint_step() {
if [ $inplace_fix -eq 0 ]; then
cmd=( tests/lint/python_format.sh )
else
cmd=( tests/lint/git-black.sh -i origin/master )
cmd=( tests/lint/git-black.sh -i origin/main )
fi
;;
jnilint)
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
project = "tvm"
author = "Apache Software Foundation"
copyright = "2020, %s" % author
github_doc_root = "https://github.com/apache/incubator-tvm/tree/master/docs/"
github_doc_root = "https://github.com/apache/incubator-tvm/tree/main/docs/"

os.environ["TVM_BUILD_DOC"] = "1"
# Version information.
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/code_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ C++ Code Styles

We use `clang-format` to enforce the code style. Because different version
of clang-format might change by its version, it is recommended to use the same
version of the clang-format as the master.
version of the clang-format as the main one.
You can also use the following command via docker.

.. code:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
TVM Community Guideline
=======================

TVM adopts the Apache style model and governs by merit. We believe that it is important to create an inclusive community where everyone can use, contribute to, and influence the direction of the project. See `CONTRIBUTORS.md <https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md>`_ for the current list of contributors.
TVM adopts the Apache style model and governs by merit. We believe that it is important to create an inclusive community where everyone can use, contribute to, and influence the direction of the project. See `CONTRIBUTORS.md <https://github.com/apache/incubator-tvm/blob/main/CONTRIBUTORS.md>`_ for the current list of contributors.



Expand Down
4 changes: 2 additions & 2 deletions docs/contribute/document.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Be careful to leave blank lines between sections of your documents.
In the above case, there has to be a blank line before `Parameters`, `Returns` and `Examples`
in order for the doc to be built correctly. To add a new function to the doc,
we need to add the `sphinx.autodoc <http://www.sphinx-doc.org/en/master/ext/autodoc.html>`_
rules to the `docs/api/python <https://github.com/apache/incubator-tvm/tree/master/docs/api/python>`_).
rules to the `docs/api/python <https://github.com/apache/incubator-tvm/tree/main/docs/api/python>`_).
You can refer to the existing files under this folder on how to add the functions.


Expand Down Expand Up @@ -96,7 +96,7 @@ to add comments about code logics to improve readability.
Write Tutorials
---------------
We use the `sphinx-gallery <https://sphinx-gallery.github.io/>`_ to build python tutorials.
You can find the source code under `tutorials <https://github.com/apache/incubator-tvm/tree/master/tutorials>`_ quite self explanatory.
You can find the source code under `tutorials <https://github.com/apache/incubator-tvm/tree/main/tutorials>`_ quite self explanatory.
One thing that worth noting is that the comment blocks are written in reStructuredText instead of markdown so be aware of the syntax.

The tutorial code will run on our build server to generate the document page.
Expand Down
26 changes: 13 additions & 13 deletions docs/contribute/git_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ Git Usage Tips

Here are some tips for git workflow.

## How to resolve conflict with master
## How to resolve conflict with main

- First rebase to most recent master
- First rebase to most recent main

.. code:: bash
# The first two steps can be skipped after you do it once.
git remote add upstream [url to tvm repo]
git fetch upstream
git rebase upstream/master
git rebase upstream/main
- The git may show some conflicts it cannot merge, say `conflicted.py`.
Expand Down Expand Up @@ -84,16 +84,16 @@ to create a PR with set of meaningful commits. You can do it by following steps.
git push --force
Reset to the most recent master
-------------------------------
Reset to the most recent main branch
------------------------------------

You can always use git reset to reset your version to the most recent master.
You can always use git reset to reset your version to the most recent main.
Note that all your ***local changes will get lost***.
So only do it when you do not have local changes or when your pull request just get merged.

.. code:: bash
git reset --hard [hash tag of master]
git reset --hard [hash tag of main]
Recover a Previous Commit after Reset
Expand All @@ -110,12 +110,12 @@ Once you get the right hashtag, you can use git reset again to change
the head to the right commit.


Apply only k-Latest Commits on to the master
--------------------------------------------
Apply only k-Latest Commits on to the main
------------------------------------------

Sometimes it is useful to only apply your k-latest changes on top of the master.
Sometimes it is useful to only apply your k-latest changes on top of the main.
This usually happens when you have other m-commits that are already merged
before these k-commits. Directly rebase against the master might cause merge conflicts
before these k-commits. Directly rebase against the main might cause merge conflicts
on these first m-commits(which are can be safely discarded).

You can instead use the following command
Expand All @@ -124,9 +124,9 @@ You can instead use the following command
# k is the concrete number
# Put HEAD~2 for the last 1 commit.
git rebase --onto upstream/master HEAD~k
git rebase --onto upstream/main HEAD~k
You can then force push to the master. Note that the above command will discard
You can then force push to the main. Note that the above command will discard
all the commits before tha last k ones.


Expand Down
8 changes: 4 additions & 4 deletions docs/contribute/pull_request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Submit a Pull Request

This is a quick guide to submit a pull request, please also refer to the detailed guidelines.

- Before submit, please rebase your code on the most recent version of master, you can do it by
- Before submit, please rebase your code on the most recent version of main, you can do it by

.. code:: bash
git remote add upstream [url to tvm repo]
git fetch upstream
git rebase upstream/master
git rebase upstream/main
- Make sure code style check pass by typing the following command, and all the existing test-cases pass.

Expand All @@ -48,8 +48,8 @@ This is a quick guide to submit a pull request, please also refer to the detaile

.. code:: bash
# Run clang-format check for all the files that changed since upstream/master
docker/bash.sh tvmai/ci-lint ./tests/lint/git-clang-format.sh upstream/master
# Run clang-format check for all the files that changed since upstream/main
docker/bash.sh tvmai/ci-lint ./tests/lint/git-clang-format.sh upstream/main
- Add test-cases to cover the new features or bugfix the patch introduces.
- Document the code you wrote, see more at :ref:`doc_guide`
Expand Down
8 changes: 4 additions & 4 deletions docs/contribute/release_process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ After generating the gpg key, you need to upload your key to a public key server

If you want to do the release on another machine, you can transfer your gpg key to that machine via the :code:`gpg --export` and :code:`gpg --import` commands.

The last step is to update the KEYS file with your code signing key https://www.apache.org/dev/openpgp.html#export-public-key. Check in the changes to the TVM master branch, as well as ASF SVN,
The last step is to update the KEYS file with your code signing key https://www.apache.org/dev/openpgp.html#export-public-key. Check in the changes to the TVM main branch, as well as ASF SVN,

.. code-block:: bash
Expand Down Expand Up @@ -90,7 +90,7 @@ To cut a release candidate, one needs to first cut a branch using selected versi
Go to the GitHub repositories "releases" tab and click "Draft a new release",

- Provide the release tag in the form of “v1.0.0.rc0” where 0 means it’s the first release candidate
- Select the commit by clicking Target: branch > Recent commits > $commit_hash
- Select the commit by clicking Target: branch > Recent commits > $commit_hash
- Copy and paste release note draft into the description box
- Select "This is a pre-release"
- Click "Publish release"
Expand All @@ -115,7 +115,7 @@ Create source code artifacts,
rm -rf .DS_Store
find . -name ".git*" -print0 | xargs -0 rm -rf
cd ..
brew install gnu-tar
brew install gnu-tar
gtar -czvf apache-tvm-src-v0.6.0.rc0-incubating.tar.gz apache-tvm-src-v0.6.0.rc0-incubating
Use your GPG key to sign the created artifact. First make sure your GPG is set to use the correct private key,
Expand Down Expand Up @@ -147,7 +147,7 @@ The release manager also needs to upload the artifacts to ASF SVN,
cd svn-tvm
mkdir tvm-v0.6.0-rc0
# copy files into it
svn add tvm-0.6.0-rc0
svn add tvm-0.6.0-rc0
svn ci --username $ASF_USERNAME --password "$ASF_PASSWORD" -m "Add RC"
Expand Down
4 changes: 2 additions & 2 deletions docs/deploy/android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ deploy_lib.so, deploy_graph.json, deploy_param.params will go to android target.
TVM Runtime for Android Target
------------------------------

Refer `here <https://github.com/apache/incubator-tvm/blob/master/apps/android_deploy/README.md#build-and-installation>`_ to build CPU/OpenCL version flavor TVM runtime for android target.
From android java TVM API to load model & execute can be referred at this `java <https://github.com/apache/incubator-tvm/blob/master/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java>`_ sample source.
Refer `here <https://github.com/apache/incubator-tvm/blob/main/apps/android_deploy/README.md#build-and-installation>`_ to build CPU/OpenCL version flavor TVM runtime for android target.
From android java TVM API to load model & execute can be referred at this `java <https://github.com/apache/incubator-tvm/blob/main/apps/android_deploy/app/src/main/java/org/apache/tvm/android/demo/MainActivity.java>`_ sample source.
Loading

0 comments on commit 0cdd285

Please sign in to comment.