Skip to content

Commit f4f6d5b

Browse files
committed
Merge branch 'main' into slice_op_cast
2 parents 2a3fb2a + 898946f commit f4f6d5b

File tree

119 files changed

+3054
-667
lines changed

Some content is hidden

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

119 files changed

+3054
-667
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,6 @@ endif()
395395
if(USE_PROFILER)
396396
message(STATUS "Build with profiler...")
397397

398-
add_definitions(-DUSE_PROFILER=1)
399398
tvm_file_glob(GLOB RUNTIME_GRAPH_EXECUTOR_DEBUG_SRCS src/runtime/graph_executor/debug/*.cc)
400399
list(APPEND RUNTIME_SRCS ${RUNTIME_GRAPH_EXECUTOR_DEBUG_SRCS})
401400
set_source_files_properties(${RUNTIME_GRAPH_EXECUTOR_SRCS}

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<!--- Licensed to the Apache Software Foundation (ASF) under one -->
2+
<!--- or more contributor license agreements. See the NOTICE file -->
3+
<!--- distributed with this work for additional information -->
4+
<!--- regarding copyright ownership. The ASF licenses this file -->
5+
<!--- to you under the Apache License, Version 2.0 (the -->
6+
<!--- "License"); you may not use this file except in compliance -->
7+
<!--- with the License. You may obtain a copy of the License at -->
8+
9+
<!--- http://www.apache.org/licenses/LICENSE-2.0 -->
10+
11+
<!--- Unless required by applicable law or agreed to in writing, -->
12+
<!--- software distributed under the License is distributed on an -->
13+
<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
14+
<!--- KIND, either express or implied. See the License for the -->
15+
<!--- specific language governing permissions and limitations -->
16+
<!--- under the License. -->
17+
18+
# Apache TVM Continuous Integration (CI)
19+
20+
## Overview
21+
22+
TVM's Continuous Integration is responsible for verifying the code in `apache/tvm` and testing PRs
23+
before they merge to inform TVM contributors and committers. These jobs are essential to keeping the
24+
TVM project in a healthy state and preventing breakages. CI in TVM is broken into these pieces:
25+
- Lint scripts in [`tests/lint`](../tests/lint).
26+
- The tests themselves, all of which live underneath [`tests`](../tests).
27+
- Definitions of test suites, with each suite defined as a separate `task_` script in
28+
[`tests/scripts`](../tests/scripts).
29+
- The linux test sequence (in [`Jenkinsfile`](../Jenkinsfile)), which lints and builds TVM and runs test
30+
suites using Docker on Linux.
31+
- The Windows and Mac test sequences (in [`.github/actions`](../.github/actions)).
32+
- GitHub Actions that support the code review process (in [`.github/actions`](../.github/actions)).
33+
- Tools to reproduce the CI locally (in `tests/scripts`).
34+
- Infrastructure-as-Code that configures the cloud services that provide Jenkins for the TVM CI (in the
35+
[`tlc-pack/ci`](https://github.com/tlc-pack/ci) repo).
36+
37+
## CI Documentation Index
38+
39+
The CI documentation belongs with the implementation it describes. To make that concrete, the
40+
documentation is split like so:
41+
1. An overview of the CI is in this file.
42+
1. User-facing documentation lives in `apache/tvm`'s `docs/contribute` sub-directory and is served on the
43+
[TVM docs site](https://tvm.apache.org/docs/contribute/ci.html).
44+
2. Documentation of the tools that run TVM's various regression tests locally and the test suites
45+
are in this sub-directory.
46+
3. Documentation of the cloud services and their configuration lives in the
47+
[`tlc-pack/ci`](https://github.com/tlc-pack/ci) repo.
48+
49+
## Jenkins
50+
51+
Jenkins runs all of the linux-based TVM CI-enabled regression tests. This includes tests against accelerated hardware such as GPUs. It excludes those regression tests that run against hardware not available in the cloud (those tests aren't currently exercised in TVM CI). The tests run by Jenkins represent most of the merge-blocking tests (and passing Jenkins should mostly correlate with passing the remaining Windows/Mac builds).
52+
53+
## GitHub Actions
54+
55+
GitHub Actions is used to run Windows jobs, MacOS jobs, and various on-GitHub automations. These are defined in [`.github/workflows`](../.github/workflows/). These automations include bots to:
56+
* [cc people based on subscribed teams/topics](https://github.com/apache/tvm/issues/10317)
57+
* [allow non-committers to merge approved / CI passing PRs](https://discuss.tvm.apache.org/t/rfc-allow-merging-via-pr-comments/12220)
58+
* [add cc-ed people as reviewers on GitHub](https://discuss.tvm.apache.org/t/rfc-remove-codeowners/12095)
59+
* [ping languishing PRs after no activity for a week (currently opt-in only)](https://github.com/apache/tvm/issues/9983)
60+
* [push a `last-successful` branch to GitHub with the last `main` commit that passed CI](https://github.com/apache/tvm/tree/last-successful)
61+
62+
https://github.com/apache/tvm/actions has the logs for each of these workflows. Note that when debugging these workflows changes from PRs from forked repositories won't be reflected in the PR. These should be tested in the forked repository first and linked in the PR body.
63+
64+
## Docker Images
65+
66+
Each CI job runs most of its work inside a Docker container, built from files
67+
in the [`docker/`](../docker) folder. These
68+
files are built nightly in Jenkins via the [docker-images-ci](https://ci.tlcpack.ai/job/docker-images-ci/>) job.
69+
The images for these containers are hosted in the [tlcpack Docker Hub](https://hub.docker.com/u/tlcpack>)
70+
and referenced in the [`Jenkinsfile.j2`](Jenkinsfile.j2). These can be inspected and run
71+
locally via standard Docker commands.
72+
73+
### `ci-docker-staging`
74+
75+
The [ci-docker-staging](https://github.com/apache/tvm/tree/ci-docker-staging>)
76+
branch is used to test updates to Docker images and `Jenkinsfile` changes. When
77+
running a build for a normal PR from a forked repository, Jenkins uses the code
78+
from the PR except for the `Jenkinsfile` itself, which comes from the base branch.
79+
When branches are built, the `Jenkinsfile` in the branch is used, so a committer
80+
with write access must push PRs to a branch in apache/tvm to properly test
81+
`Jenkinsfile` changes. If your PR makes changes to the `Jenkinsfile`, make sure
82+
to @ a [committer](../CONTRIBUTORS.md>)
83+
and ask them to push your PR as a branch to test the changes.
84+
85+
# Jenkins CI
86+
87+
TVM uses Jenkins for running Linux continuous integration (CI) tests on
88+
[branches](https://ci.tlcpack.ai/job/tvm/) and
89+
[pull requests](https://ci.tlcpack.ai/job/tvm/view/change-requests/) through a
90+
build configuration specified in a [`Jenkinsfile`](../Jenkinsfile).
91+
Other jobs run in GitHub Actions for Windows and MacOS jobs.
92+
93+
## `Jenkinsfile`
94+
95+
The template files in this directory are used to generate the [`Jenkinsfile`](../Jenkinsfile) used by Jenkins to run CI jobs for each commit to PRs and branches.
96+
97+
To regenerate the `Jenkinsfile`, run `make` in the `ci/jenkins` dir.

ci/jenkins/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/_venv
File renamed without changes.
File renamed without changes.
File renamed without changes.

jenkins/Jenkinsfile.j2 renamed to ci/jenkins/Jenkinsfile.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
// Generated at {{ generated_time }}
4949

5050
import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
51-
{% import 'jenkins/macros.j2' as m with context -%}
51+
{% import 'ci/jenkins/macros.j2' as m with context -%}
5252

5353
// NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. -->
5454
ci_lint = 'tlcpack/ci-lint:20220513-055910-fa834f67e'
@@ -106,12 +106,12 @@ s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBE
106106
// General note: Jenkins has limits on the size of a method (or top level code)
107107
// that are pretty strict, so most usage of groovy methods in these templates
108108
// are purely to satisfy the JVM
109-
{% include "jenkins/Prepare.groovy.j2" %}
110-
{% include "jenkins/DockerBuild.groovy.j2" %}
111-
{% include "jenkins/Lint.groovy.j2" %}
112-
{% include "jenkins/Build.groovy.j2" %}
113-
{% include "jenkins/Test.groovy.j2" %}
114-
{% include "jenkins/Deploy.groovy.j2" %}
109+
{% include "ci/jenkins/Prepare.groovy.j2" %}
110+
{% include "ci/jenkins/DockerBuild.groovy.j2" %}
111+
{% include "ci/jenkins/Lint.groovy.j2" %}
112+
{% include "ci/jenkins/Build.groovy.j2" %}
113+
{% include "ci/jenkins/Test.groovy.j2" %}
114+
{% include "ci/jenkins/Deploy.groovy.j2" %}
115115

116116

117117
cancel_previous_build()
File renamed without changes.

ci/jenkins/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
_venv: requirements.txt
19+
rm -rf _venv
20+
python3 -mvenv _venv
21+
_venv/bin/pip3 install -r requirements.txt
22+
23+
all: _venv
24+
_venv/bin/python3 generate.py
25+
26+
.PHONY: all venv
27+
.DEFAULT_GOAL=all

0 commit comments

Comments
 (0)