This PR simplifies Jenkins pytest execution around standard pytest-xdist
behavior.
- Runs each already-filtered CPU/GPU suite once with `-n auto`; the
broad suite keeps load-group scheduling because its order-sensitive
cases require it.
- Removes external sharding, wrapper/profile code, JUnit XML generation
and publication, the skipped-test XML consumer, obsolete suite naming,
and orphaned helpers.
- Retains one inert `task_clear_pytest.sh` entry point only because PR
jobs evaluate their Jenkinsfile from the trusted base branch before
checking out the PR; it performs no cleanup or reporting and can be
removed after this pipeline lands.
- Corrects stale broad-suite paths and explicit target guards, and
migrates a scalar stride test to the current `T.handle` pointer
semantics while preserving its negative lowering check.
- Prevents nested MetaSchedule/XGBoost unit tests from multiplying CPU
fanout without serializing the full suite.
- Builds only the `tvm_runtime` target for the secondary GPU
configuration and removes its unconsumed `gpu2` artifact upload.
The result reduces parallelism to one layer managed by pytest-xdist
while preserving GPU filtering and native failure visibility.
Retire GitHub automation that is disabled, non-functional, unowned, or
explicitly no longer wanted, together with its orphaned support code and
tests.
This removes the optional Dependabot version-update config; automatic
team mentions and cc-review requests; last-successful and nightly branch
advancement; reviewer pings; the disabled PR-comment bot; and the unused
CI-resource upload path. Active CI, release, tvm-bot, and manual
Docker-update workflows remain, with narrower permissions and event
guards, plus refreshed issue-template and network-resource guidance.
The behavior change is intentional: reviewer requests and team routing
become manual, and the nightly and last-successful branches are no
longer advanced by this repository. Dependabot security updates remain
controlled by repository settings.
Remove the retired ci_lint Docker image definition and its legacy lint
wrapper after the Jenkins matrix stopped building ci_lint in #19872.
Also remove the ci_lint entry from docker-images.ini, drop the
retired-image skip from the nightly Docker updater, and update the CI
test fixture accordingly.
Keep the temporary git_change_docker.sh ignore entries for the deleted
lint Docker files so this cleanup PR does not trigger an unnecessary
Docker image rebuild.
The quay.io/manylinux_cuda image ships the CUDA toolkit but omits the
libcuda driver stub (cuda-driver-devel). Without it CMake's FindCUDA
leaves CUDA_CUDA_LIBRARY empty, and since a shared library links fine
with undefined symbols, libtvm_runtime_cuda built with no libcuda.so.1
dependency -- ldd/readelf did not list it -- breaking downstream use.
Install cuda-driver-devel-13-1 from the CUDA repo already configured in
the image (a ~45 KB package with no dependencies, not the full toolkit
download). The stub lands under /usr/local/cuda/.../stubs where FindCUDA
looks, so the sidecar links libcuda.so.1 again.
Also fail CMake configure with a clear error when CUDA_CUDA_LIBRARY is
unset, so a missing driver stub can never again silently ship a runtime
sidecar without its libcuda dependency.
This is the first step in retiring the unused `ci_lint` Docker image.
This PR removes `ci_lint` from the generated Jenkins Docker image matrix
so new Jenkinsfiles no longer resolve, build, or deploy that image. It
also skips `ci_lint` in the nightly Docker image updater and teaches
`git_change_docker.sh` to ignore the lint Docker files that will be
removed later.
The actual lint Docker files are intentionally kept in this PR for
compatibility with the current Jenkins PR bootstrap path. Some PR Docker
jobs may still run the main-branch pipeline while reading files from the
PR checkout, and that older pipeline still passes `ci_lint` to
`determine_docker_images.py` during prepare. Keeping the files and the
temporary `docker-images.ini` entry avoids failing before the updated
generated Jenkinsfiles take effect.
A follow-up PR can delete `docker/Dockerfile.ci_lint`,
`docker/install/ubuntu_install_clang_format.sh`, `docker/lint.sh`, and
the README lint Docker example after this lands.
The Jenkins PR title/body linter is comparatively heavy and can report
false positives before the normal CI signal is available.
This removes the check_pr step from the Jenkins prepare flow and drops
the now-unused script-level test coverage.
This pr is the follow-up pr of #19754. It removes the redundant `pip
install -U pip cmake ninja` (since those are already installed in
docker) and the unused python_bin variable, and update the comment to
match: the image provides the build tools, and PATH only needs the
bundled CPython (for the configure) plus the CUDA toolchain (for nvcc).
Also fixs a stale comment in the Windows sidecar: it claimed the conda
13.0.2 pin matched the Linux hook, but the Linux side is now CUDA 13.1
(from the image). The win-64 nvidia channel still caps at 13.0.x, so
Windows stays on 13.0.2 -- slightly behind Linux but harmless, since the
sidecar has no device code and links the CUDA runtime by soname only.
The Windows pip install is kept: that build uses the Ninja generator and
runs on a runner without the prebuilt CUDA image.
This pr follows the cibuildwheel 4.0 announcement, the official prebuilt
quay.io/manylinux_cuda images ship the CUDA toolkit preinstalled under
/usr/local/cuda on the same manylinux_2_28 baseline the wheel targets.
also switchs the Linux build_cuda_runtime sidecar legs to
quay.io/manylinux_cuda/manylinux_2_28_{x86_64,aarch64}_cuda13_1 and drop
the per-run NVIDIA local-repo RPM download plus dnf install of the
toolkit, which pulled several GB from developer.download.nvidia.com on
every run and was the main source of sidecar build-time variance. This
moves the Linux sidecar from CUDA 13.0.2 to 13.1; the soname stays
libcudart.so.13, so the repair-step glob excludes (libcudart.so.*) are
unaffected and the sidecar carries no device code. The Windows sidecar
keeps using conda and is unchanged.
## Summary
`ci/jenkins/data.py` was carrying two unrelated concerns: artifact
bundle definitions for s3 staging, and the docker image tag registry.
This PR decouples both from the Jenkinsfile-generated code, making each
concern standalone and machine-readable without Python.
## Changes
### Part 1 — Bundle refactor (`10950ac192`)
- `ci/scripts/jenkins/s3.py` gains `--bundle <name>` (repeatable) that
resolves bundle names from `ci/jenkins/data.py::files_to_stash` at
runtime; `--items` preserved for back-compat
- `ci/jenkins/templates/utils/macros.j2` `upload_artifacts` macro emits
`--bundle <name>` flags instead of inlining the file list as `--items`
- Template callsites (cpu, gpu, arm) updated to pass `bundles=[...]`
names
- Generated `.groovy` files regenerated — no `build/` paths appear in
artifact upload blocks; only bundle names
### Part 2 — Docker image registry extraction (`6df22c09b9`)
- New `ci/docker-images.ini` (one `[ci_*]` section per image) is the
single source of truth for image tags
- `docker/dev_common.sh::lookup_image_spec` reads the ini directly with
`awk` — no Python invocation
- `ci/jenkins/data.py` drops the inline `docker_images` dict; loads it
via `configparser` from the ini, preserving the same nested-dict shape
so Jinja templates and the current `s3.py` module import keep working
unchanged
- `data.py __main__` is now the bundle-resolver CLI (`python3
ci/jenkins/data.py <bundle> [...]` → file paths, one per line) — no more
dual-purpose image-name lookup branch
- `ci/scripts/jenkins/open_docker_update_pr.py` updated to read/write
`ci/docker-images.ini` instead of `data.py`
## Acceptance
```
# No build/ artifact paths in generated Jenkinsfiles (bundle names only):
grep -rn "build/lib\|build/cpptest" ci/jenkins/generated/ # → nothing
# generate.py is byte-identical after the change:
python3 ci/jenkins/generate.py # → "no changes made" for all 5 groovy files
# dev_common.sh resolves same tag as before:
bash -c 'source docker/dev_common.sh && lookup_image_spec ci_cpu'
# → tlcpack/ci-cpu:20251130-061900-c429a2b1
```
## Summary
Remove legacy lint scripts from `tests/lint/` that are now redundant
with the
pre-commit + ruff workflow. Also remove Apache RAT and Java from the
Docker
lint image since ASF header checking is now handled by Python directly.
## Changes
- Delete 8 legacy lint scripts (`cpplint.sh`, `pylint.sh`, `flake8.sh`,
etc.)
and their configs (`pylintrc`, `rat-excludes`)
- Simplify `task_lint.sh` and `docker/lint.sh` to delegate to pre-commit
- Remove RAT/Java install from `Dockerfile.ci_lint` and legacy pip
packages
(`cpplint`, `pylint`, `mypy`, `black`, `flake8`, `blocklint`)
This PR enables ruff pyupgrade (UP) rules with py310 target, auto-fixing
~5600 annotation modernizations (PEP 585 generics, PEP 604 unions,
deprecated typing imports).
Also removes from __future__ import annotations from ir/module.py and
rmsnorm.py, bumps requires-python to >=3.10, and removes absolute_import
aliases from topi/contrib files.
## Related PR
https://github.com/apache/tvm/pull/18710
## Why
- f.readlines() returns lines that already have \n at the end
- Script then does "\n".join(content), which adds another \n between
each line
- Result: every line gets a blank line after it → file becomes malformed
→ lint fails
## How
- "\n".join(content) to "".join(content)
Signed-off-by: Guan-Ming Chiu <guanmingchiu@gmail.com>
Prior to this commit, the `image_exists` utility in
`determine_docker_images.py` logged the full response for success, and
the full HTTP error if an exception is caught. However, this is the
expected behavior when loading a docker image from `tlcpackstaging`,
such as the current images tagged with `20240428-060115-0b09ed018`.
Logging this fallback as an error makes it difficult to find the first
actual error that occurred in CI.
This commit updates these logging statments `logging.info` and
`logging.exception` to instead use `logging.debug`.
Prior to this commit, the `Sh.tee` method was implemented by calling
`f"{cmd} | tee"` in `subprocess.run`. While the `check=True` flag was
used, the return code was from `tee`, not from the command itself.
This causes failures in the command itself to be silently ignored,
such as in [this CI
pipeline](https://ci.tlcpack.ai/blue/organizations/jenkins/tvm-i386/detail/PR-16183/37/pipeline)
in the `ci/scripts/jenkins/s3.py` step.
This commit updates `Sh.tee` to call `subprocess.Popen` for `cmd`, tee
the stdout, and check the return code. (Roughly adapted from [this
stackoverflow post](https://stackoverflow.com/a/56484734).)
This PR separates the CRT template project for microTVM from CRT standalone library build. The CRT template project would move to build/microtvm_template_projects.
It also adds uploading microtvm_template_projects to S3 in few images that were missing this previously.
Hardcoding the Docker images in the Jenkinsfiles has the downside that only trusted changes are actually run in CI. Since Docker image updates are pretty frequent, this makes for a pretty bad UX (e.g. CI runs but doesn't actually test the PR). The fix here makes it so the images are read from a different file during CI execution so updates from anyone are picked up.
This PR eliminates the need to use the batch jobs in Jenkins to update Docker images. Docker images are built as part of post-merge CI on `main` and anyone can trigger a validation run by filing a PR with changed Docker tags.
This breaks up the Jenkinsfile into ones for GPU, CPU, etc. This removes a false dependency between the build and test steps (e.g. before the GPU tests had to wait on the Hexagon build to complete) and makes the Jenkins UI a bit better since there's not 30 tests to scroll through to find a failure. An example can be found in my fork here: https://github.com/driazati/tvm/pull/38 in the checks box. Before this is merged https://github.com/tlc-pack/ci/blob/main/jenkins/jenkins-jobs/prod/tvm.yaml will need to be updated to accept webhooks from apache/tvm instead of my fork.
See #13337 for more context
* [ci] Split out C++ unittests
This makes C++ unittests follow the normal flow of build -> upload
artifacts -> download and run tests. To simplify the changes there is a
new utility for interacting with S3.
* Comments
Co-authored-by: driazati <driazati@users.noreply.github.com>
In this PR, the skipped tests script will also check if tests in the `required_tests_to_run.json` have not been skipped. If there are skipped tests, they will be added to the returned comment.
I am not entirely sure where it's best to place the `required_tests_to_run` file, so I left it in `tvm/ci/scripts/`. I am happy to take suggestions.
Aims to prevent situations such as #12529
These files have no effect on Docker image builds so if they are changed
we shouldn't be triggering a Docker image build. Right now if anything
in `docker/` is touched a build is run, this adds a short exclusion list
of some files (each of which is used for local testing or is exercised
already in CI).
Marked with `[skip ci]` since this runs during the Jenkins prepare step
anyways.
Co-authored-by: driazati <driazati@users.noreply.github.com>
This adds a short lint to ensure that all files have a single trailing newline and no trailing whitespaces. This PR is in two commits, one to add the check and another to fix currently offending files in the repo. See https://github.com/apache/tvm/pull/13058/commits/ba2c2e235e2a16d62fdeed959044c65012d9f942 for just the significant changes. Auto-corrections applied with
```
pre-commit run --all-files
```
This would post the comment that the tests bot and the docs comment bot
uses straightaway when a PR is posted. This will contain links to
generic info about posting PRs (and obviate the
`.github/PULL_REQUEST_TEMPLATE.md`) as well as dynamic info about the
specific PR (filled in later by the respective bots). This would make
things like the auto-cc bot more transparent since it would have a link
to the relevant issue.
Tested live here: https://github.com/driazati/tvm/pull/21#issuecomment-1236019529
Recently virtual environments were introduced in the
docker images which was a great contribution to
localize errors: https://github.com/apache/tvm/pull/12663. In this fix, link to the caffe is
created inside this virtual env instead of adding it
to the system path of python. This fix also removes
importing request package where not needed.
Fixes#12663