70 Commits

Author SHA1 Message Date
Tianqi Chen cfb98e938c [CI] Simplify Jenkins pytest execution (#19947)
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.
2026-07-05 09:59:51 -04:00
Shushi Hong d1f5583e0e [Docs] Add tutorial for importing models from PyTorch, ONNX, and TFLite (#19354)
This pr adds a tutorial for user to have a quick understanding of how to
import models from our supporting frontends.


Besides, this pr also adds `absl::InitializeLog` and `trackable_obj`
warnings to the CI docs ignore list — these are emitted by TensorFlow's
C++ runtime during import and cannot be suppressed from Python.
2026-04-06 14:52:17 -04:00
Masahiro Hiramori 75f8589732 [CI] Update images to 20260301-134651-63f099ad (#18827) 2026-03-03 15:04:24 +09:00
Tianqi Chen e30208ce5a [REFACTOR] Phase out root Makefile (#18828)
This PR removes the root Makefile and inlines its remaining
functionality
into CI scripts and READMEs. Also removes legacy lint scripts that are
now handled by pre-commit.

## Changes

- **Delete root `Makefile`** — all targets either unused or inlined
- **Create `tests/scripts/task_jvm_build.sh`** — extracted JVM platform
  detection + mvn build from Makefile
- **Update CI scripts**: `task_python_docs.sh` (cppdoc/javadoc),
  `task_java_unittest.sh` (jvmpkg), `cppdocs.sh` (doxygen)
- **Update READMEs**: `docker/README.md`, `jvm/README.md`,
  `apps/cpp_rpc/README.md` — replace `make` with direct commands
- **Remove legacy lint scripts** from `tests/lint/` (8 files) —
  pre-commit handles all linting now

Subdirectory Makefiles (`docs/Makefile`, `web/Makefile`) are unchanged.
2026-02-26 16:22:15 -05:00
Tianqi Chen 70e9164814 [REFACTOR][FFI] Split tvm-ffi into a separate repo (#18314)
This PR updates the code so we split tvm-ffi into a separate repo
2025-09-14 06:58:43 -04:00
Tianqi Chen a7a0168be5 [FFI][REFACTOR] Establish tvm_ffi python module (#18226)
* [FFI][REFACTOR] Establish tvm_ffi as a standalone python module

This PR establishes tvm_ffi as a standalone python module.
The ffi is structured as a minimal pip module that can be
directly install by path or url.

examples/get_started provided a minimal example.
This is a major change as we are decoupling tvm_ffi as a
separate package, users need to install tvm_ffi separately.

Thanks to its minimal dependency, tvm_ffi can be easily installed
even just from the source by pip install ./ffi

This change would enable future improvement for library plugins
to have lightweight dependencies by just working on top of
the tvm_ffi, while the main compiler toolchain and runtime
can be layered on top.

* [FFI] Improve traceback setups

This PR improves traceback related setups
2025-08-24 15:46:20 -07:00
Tianqi Chen 283fecbd6e [REFACTOR] Phase out legacy rust ffi (#17939) 2025-05-10 09:50:26 +08:00
Tianqi Chen 2cbd35d5d1 [PYTHON] Build cython by default (#17637)
Historically we have been maintaining cython and ctypes for FFI.
One reason was cython was not that available then.
Cython have quite good availability now and also enjoys great
perf benefit. This PR changes the CMake to make cython as required
dependency of the python package and build cython by default.
It also removes ctypes testcases in favor of all cython tests.

If things go well, we can consider remove ctypes and focus on
cython support onward.
2025-02-12 12:43:09 -05:00
Siyuan Feng 9898039456 [docs] Download 3rd party embeds to local files
Add a script to download 3rd party embedded resources (CSS, JS, etc) to
local files. This ensures that the documentation can be viewed offline
and reduces external dependencies.

The script:
1. Detects external URLs in HTML/CSS files
2. Downloads the resources to _static/downloads
3. Updates the HTML/CSS files to use local copies
2025-02-05 09:52:35 -05:00
Siyuan Feng a65d3d4d57 [Refactor] Phase out legacy docs
This commit removes legacy docs.
2025-01-24 19:25:02 -05:00
Siyuan Feng f717c5655c [Refactor] Phase out microTVM (#17554) 2024-12-10 08:43:05 -05:00
Masahiro Hiramori 92e2bba08e [CI] Upgrade CI image to 20241105-030952-3e386fd3 (#17451)
* use `20241105-030952-3e386fd3` for ci

* fix missing `language` kwarg in save_rst_example

* disable invalid-name check by pylint

* disable caffe frontend tests

* disable mxnet frontend tests

* fix stablehlo importer

* enable some stablehlo tests

* skip tests because mxnet raise AttributeError

* use stable sort for `np.argsort`

* fix `TypeError: arrays to stack must be passed as a "sequence" type such as list or tuple.`

* disable tests because of shape error

* remove `get_html_theme_path` because it's deprecated

* ignore warnings from sphinx

* disable oneflow frontend tests

* remove oneflow tutorial

* remove debug print
2024-11-26 10:38:25 +09:00
Siyuan Feng 32063b0dfc [Doc] Quick Start (#17289)
This PR introduces a new quick start tutorial to the documentation.
2024-08-22 10:24:23 -04:00
Siyuan Feng 707492a677 Revert "[#15157][Rust][Doc] Re-enable the Rust documentation build (#15213)" (#16127)
This reverts commit c928852d59.
2023-11-14 18:22:16 -05:00
Neo Chien c928852d59 [#15157][Rust][Doc] Re-enable the Rust documentation build (#15213)
This PR is trying to fix issues #15157 and #9217, any suggestions and feedback would be appreciated if you are available.

Reference: #9288
2023-07-04 23:23:12 -07:00
Yong Wu aa7d2bff6b [CI] Modify test cases to accommodate the CI upgrades (#14651)
* [CI] update all the images

* Update test_config

* Fix llvm_codegen_test err

* Update with newly built images

* update pylintrc

* Update i386 build

* Don't use ninja for i386

* Update torch tests

* Debug i386 platform

* check ec2 instance type for i386

* Remove gluoncv ssd example

* Update pylint

* Update test images

* Skip torch jit trace issue for arm

* Fix pylint

* update tests

* update i386 build

* update s3.py to skip non-existing files

* update pylint

* Update pylint

* Fix tests

* update clang-format to 15

* update tests for clang-format-15

* run with newly images

* skip oom test for i386

* Upgrade for DGL sample

* fix black

* Ignore a warning in doc

* New run with newly images

* Use newly generated tlcpackstaging images
2023-05-05 11:54:41 +01:00
Leandro Nunes 90fb79b74c [CI] Update Docker images to bring TF 2.9 and integration tests (#12738)
[CI] Update Docker images to tag 20220908-060034-62bdc91b1

Updates all Docker images to tag 20220908-060034-62bdc91b1, to
update TensorFlow/TFLite/Keras to 2.9, and cascaded dependencies
such as numpy. Updates ethos-u-vela to 3.4.0.

It also brings ONNX and PyTorch to ci_arm, to enable Integration
tests to be run in CI.

Standadises the minimum CMake version required in CI to be 3.18.4,
fixing apps/microtvm/zephyr_cmsisnn to require this version.

Finally, adds a new import error in the tutorials documentation
which doesn't affect the final result. The new warning added is
'absl:Found untraced functions such as _jit_compiled_convolution_op'
2022-09-09 16:24:05 +01:00
Mehrdad Hessar c15cc5ef6d [Target] Remove deprecated parameters from target (#12416)
* remove depricated parameters in target

* lint

* fix cpp tests

fix

* remove more configs in test files

* address comments

* fix error

* fix hexagon

* fix micro tutorial

* fix integration tests

* fix hexagon

* lint

* fix unittest

* fix readme

* fix assert executor in target

* address comments

* fix tutorials

* fix hexagon target

* fix tutorial

* fix for tutorials

* hexagon
2022-08-24 13:02:27 +09:00
Christopher Sidebottom 1de32b587b [Target] Add Target Parser for Arm(R) Cortex(R) M-Profile CPUs (#12319)
This implements an initial Target Parser which uses the same logic as
the CMSIS-NN compiler flags to update the features and keys of the `c`
and `llvm` `Target`s.

Refactoring of the CMSIS-NN logic will be in a separate patch.
2022-08-12 16:31:34 +01:00
Gavin Uberti f05ebde8e8 [docs] microTVM model training tutorial with Colab support (#10921)
* First draft of micro train tutorial

* unit test code

* Fix obvious formatting issues

* Linting

* Proof of concept showing that "Open in Colab" is possible

* Make test Python script more readable

* Fix formatting

* Ready for review

* Import pyserial only when needed

Changes from code review

Use official sphinx-gallery repo

Correctly specify version

Import pyserial only when necessary

* Add warning to ignored list

Try to avoid throwing warning

Fix linting, try verbosity filter

Try adding to ignore file

Remove fix attempts

* Grammar fixes

* Address code review comments

Include full git hashes

* Rerun tests

* Rerun again
2022-06-03 15:23:46 -07:00
driazati b141cacaf3 [ci] Add -x to all CI scripts
Fixes #10316




cc @Mousius @areusch
2022-05-24 19:08:45 +00:00
Mehrdad Hessar ed6e7c07a5 [microTVM] Enable micro tvmc tutorial testing in CI (#10555)
* Add script convertor

* Address comments: added test

* address comments
2022-03-16 14:38:33 -07:00
driazati 47cd410c6c Deploy docs to tvm-site/asf-site on main (#10494)
* Deploy docs to tvm-site/asf-site on main

commit-id:59241556

* Use oauth

* testing code

commit-id:6cc27fce

Co-authored-by: driazati <driazati@users.noreply.github.com>
2022-03-14 11:50:04 -07:00
Lite Ye c54a3dd699 Use /usr/bin/env bash in shebang for all scripts under tests (#10277)
* Use /usr/bin/env bash in shebang

This makes scripts executable on system without /bin/bash (NixOS)

* Use `set -e` in script instead of `bash -e` in shebang
2022-02-17 18:01:38 +09:00
David Riazati b365586159 Use ci.py explicitly in docs building instructions (#9971)
This adds `ci.py` to the docs to make it more clear how to easily build the docs locally. This also re-arranges CI following the merging of all CI steps to run concurrently since there's no need to run the Sphinx precheck during GPU unit tests. This still preserves it though in the docs step as a way to quickly bail out if there are formatting errors so the full tutorials don't get built.

Co-authored-by: driazati <driazati@users.noreply.github.com>
2022-01-31 09:35:10 +00:00
driazati f0ae9d3313 Add make docs and doc building instructions (#9534)
* Update doc building instructions and pin dependencies

This pins the dependencies for the docs and adds `pytest` as a
dependency which was missing when I built. Tested out the
requirements.txt with a fresh `ubuntu:focal` Docker image to verify that
the required depedencies work.

* Address comments, add Makefile for docs and add to instructions

* Use Python for running scripts

* Fix lint, add lint command

* Add option for cpu to only run the precheck, address comments

* Fix 'make doc' usage, add some -x's

* Fix bad condition on --cpu, add defaults for envs

* Fix another 'make doc'

* Fix for running on MacOS

Co-authored-by: driazati <driazati@users.noreply.github.com>
2021-12-13 16:33:58 -08:00
Altan Haan b5d863ca52 fix docs (#9266) 2021-10-13 11:07:20 +09:00
Chris Hoge 44549e6234 Documentation Refactor (#9203)
* Documentation Refactor - Stage 1

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: https://github.com/apache/tvm/issues/8987

Stage 1 of the documentation refactor reorganizes the docs structure,
moving files (without content changes) and adding new scaffolding to
generate the proper document tree.

It does not address naming, style, content, links, or other existing
content in documents that were moved. State 2 will address fixing these
issues with existing content.

Major changes include but are not limited to:

* Dividing the existing tutorials into two sections:
  * Tutorials
  * How Tos
* Moving all of the existing tutorials out of the `/tutorial`
  directory and into the more general `/gallery` directory.
* Breaking up how-tos into individual sections for more
  flexibility and more consistent rendering.
* Moving content into new classifications:
  * `/docs/arch` for architecture guides
  * `/docs/reference` for API guides and other reference material
  * `/docs/topic` for topic specific guides such as microTVM and VTA
  * Restructuring `/docs/dev`
* Adding a table of contents to the doc index
* Adding instructions on how to install using third-party tlcpack

* Documentation Refactor - Stage 2

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: https://github.com/apache/tvm/issues/8987

Stage 2 of the documentation refactor fixes naming and links
in the documentation to be consistent with the overall structure.

Major changes include:

* an update to how to contribute to docs.
* several updated index pages with title changes to match
  the organization style and bring consistency to the sections
* expanded descriptions of some page collections
* fixed links

* Documentation Refactor - Stage 3

RFC: https://github.com/apache/tvm-rfcs/blob/main/rfcs/0027-formalize-documentation-organization.md
Tracking Issue: https://github.com/apache/tvm/issues/8987

Stage 3 of the documentation refactor adjusts CI for the new structure.
The CI build script takes into account the new gallery format. It
also prevents deleting existing documents, and takes advantage of the
`_staging` and `_build` directories to clean out previous builds.
2021-10-09 19:52:54 -04:00
Tianqi Chen a4fb12d1e9 [CI] Cleanup stale logs for auto-tuning (#8160) 2021-05-29 09:55:59 +09:00
Tianqi Chen 8c8971a7e0 [CI] Temp disable rust docs build (#7743) 2021-03-26 14:25:45 +09:00
Lianmin Zheng 050a836b18 [AutoScheduler] Tutorial on auto-scheduling a network for GPU (#6882)
* add a tutorial on auto-scheduling a network for cuda

* fix typo

* fix training time printing

* fix lint

* fix

* upload logs

* fix

* use weighted sum as the default objective function

* update ci logs

* fix the bug in kill_child_processes

* fix test

* address comments

* add early stopping in task scheduler & fix a stuck issue in measurement

* fix lint

* trigger CI

* fix early stopping
2020-11-13 00:36:24 -08:00
Tianqi Chen 3ff010063d [CI] Add more guidelines about local setup (#6848) 2020-11-04 16:38:25 -05:00
Tianqi Chen 4122defa6f [DOCS] Enable theme with header and footer. (#6834)
Also fixed a sphinx warning in pytorch.
2020-11-03 18:19:07 -05:00
Lianmin Zheng 453d30c784 [AutoScheduler] Re-organize logs files for tutorials (#6768)
* reorganize logs files

* fix lint
2020-10-27 07:05:10 -07:00
Jared Roesch ee9b6d6de5 [Docker] Turn on Rust docs and MxNet based ResNet (#6640)
* Enable ResNet and Rust docs

* Tweak

* Format

* Fix issue with overwriting
2020-10-24 00:15:38 -07:00
Cody Yu 7158a4bf14 [AutoScheduler] Guarantee init population sampling outputs a valid set (#6713) 2020-10-23 13:17:53 -04:00
Cody Yu f2f52a5dc4 [AutoScheduler] Use tempfile in tutorials (#6728)
* Use tempfile in tutorials

* address comment

* Update tutorials/auto_scheduler/tune_matmul_x86.py

* Update tutorials/auto_scheduler/tune_conv2d_layer_cuda.py

Co-authored-by: Lianmin Zheng <lianminzheng@gmail.com>
2020-10-22 08:04:44 -07:00
Max Willsey 277bfc86aa [Rust] Improve NDArray, GraphRt, and Relay bindings (#6563)
* WIP

WIP

* Add support for loading Python packed functions

* Flesh out Relay AST in Rust

* More tweeks for getting functions out

* Deploy Rust docs as part of build

* Add some more types

* Introduce NDArray 2.0

* Work on NDArray 2.0 before restoring tests

* Formatting and code fixes to get it to compile

* Add more Rust bindings

- Converts Conv2d attrs to use tvm::String, so that we can add Rust binding
- Uses Type for checked_type in Rust bindings
- Fix type key in Rust bindings
- Make data field contain NDArray in Rust bindings

* Clean up object ptr passing.

* WIP

* Add debugging for NDArray and fix all test cases

* Add breaking test

* Dispatch some todos

* Format

* Fix ndarray size and len

* Add BiasAddAttrs rust bindings

* Add DenseAttrs rust bindings

* Change to TVM string

* Add more Rust bindings

Add GlobalPool2DAttrs Rust binding

Add ExpandDimsAttrs Rust bindings

Add MaxPool2DAttrs rust bindings

* Fix some test attributes

* Improve the NDArray api

* Fix some more ndarray stuff

* Get the resnet demo kinda working

* Add SoftmaxAttrs Rust bindings

* Implement Hash and Eq for Relay Exprs

* Add underscore to unused function

* Fix broken ass resnet script

* Improve some ndarray conversions

* Make sure the build script runs correctly

* Clean up ResNet example tremedously

Expose C++ graph runtime via cleaner Rust API rewrite example.

* Add ASF header

* Format

* Format

* Format resnet rust python script

* Add type files and refactor span

* Format

* Format

* Change types from std::string to tvm::String in packed function

* Add ASF header

* Fix test w/ ndarray's API change

* Fix array test

* Fix anyhow import

* Put back some anyhow stuff

* Clean up

* Try and fix tests/scripts/task_rust.sh

* Disable ResNet for now

* Turn off building of Rust docs until we update CI

* Actually disable

Co-authored-by: Jared Roesch <jroesch@octoml.ai>
Co-authored-by: Gus Smith <guscomps@gmail.com>
2020-10-06 01:52:53 -07:00
Tianqi Chen 693c0dede1 [RELAY] Fix the FoldConstant Regression for VTA (#6377)
* [RELAY] Fix the FoldConstant Regression for VTA

* [CI] Fix error guard that was missed in VTA.

This PR fixes an error guard during the documentation build step.

- Temporary disables VTA frontend tutorial due to
  the regression of deploy_detection
2020-09-02 12:17:14 -07:00
Tianqi Chen 520ca0a8b3 [CI] Limit number of threads in all jobs (#5815) 2020-06-15 10:28:59 -07:00
Tianqi Chen afc239aeb8 [REFACTOR][PY] relay.op.Op -> tvm.ir.Op (#5705)
* [REFACTOR][PY] relay.op.Op -> tvm.ir.Op

* Improve the error check
2020-06-01 15:35:06 -07:00
Tianqi Chen c365c2aa87 [CI] Add log check to the sphinx gallery docs (#5643)
* [CI] Add log check to the sphinx gallery docs

This PR add log check to sphinx gallery tutorials to prevent
the case when sphinx failed to capture the error in tutorials.

* Fix the status
2020-05-21 18:37:58 -07:00
Tianqi Chen d8b185c674 [DOCS] Move the api docs to the api subfolder (#5626)
* [DOCS] Move the api docs to the api subfolder

* Update numpydoc location

* Ignore 403

* make sure folder exists
2020-05-19 21:40:06 -07:00
Tianqi Chen 79485fb343 [CI] Enable llvm-11 and llvm-10 in build tests, recover webdocs. (#5579)
This PR ties up the last loosen end of the recent CI update.
2020-05-12 19:31:45 -07:00
Tianqi Chen 702fd0f0f4 [WEB][RUNTIME] TVM WebAssembly JS Runtime (#5506)
* [WEB] Remove the old web runtime

* [WEB][RUNTIME] TVM WebAssembly Runtime

This PR introduces a brand new TVM web runtime based on the WASM standard API.
Main highlights:

- The new runtime is rewritten using the Typescript.
- The new runtime now directly interfaces with WebAssembly's standard API,
  instead of relying on emscripten's API.
  This change will make the js runtime more portable to runtime variants.
  For example, we could also try to make it interface with the tvm's rust runtime implementation.
- System library can be provided through WASI
  - We also build a hack to enable Emscripten to generate a WASI like
    bundle for runtime environment on the Web.
- The wasm generation now uses the mainlin LLVM.
- Dynamic link(dlopen) is not used due to limitation of wasm,
  instead we rely on the recent new RPC refactor to directly
  restart a new session for each wasm binary sent to the RPC.

* Address review comments

* Skip tensorcore test
2020-05-07 13:47:36 -07:00
Ramana Radhakrishnan e149db2830 [RFC] Pytest environment improvements (#5421)
* [RFC] Pass pytest options globally.

In many places having a global pytest flag is useful . For me with the
build and test of tvm , I would like to be able to globally pass in
pytest options as part of development flow or CI flows where one would
like to measure other things regularly that need measurements including
pytest coverage data that I would like to experiment with across the stack.

This has been achieved with an additional setup-pytest-env.sh file in
tests/scripts rather than putting in something in every single task test
script and something I would like to avoid.

This now means the -v option to pytest is superfluous. I did consider
having a pytest.ini file but that doesn't allow me to pass any old
environment variable in and this seems to be the compromise.

* Improve other use case documentation

* Rationalize pytest environment.

* Remove the setting from docker/with_same_user.
* Take the opportunity to migrate common PYTHONPATH and
TVM_PATH into the common environment setting.

* Fixup vta fsim

* Be more explicit with common PYTHONPATH

* Fix python path for task_python_vta_fsim.sh properly

* Fix nit in documentation.
2020-04-23 15:05:03 -07:00
Tianqi Chen 4e05b47e03 [BUGFIX] Fix CRT static test bug (#5293)
* [CI][DOCS] Make sure to refresh the cython part

* [BUGFIX] Fix CRT static test bug

* Fix demo_static

* resolve review comment
2020-04-09 12:48:51 -07:00
Tianqi Chen 62b3195b3c [DOCS] Misc docs improvements (#5222)
- Reduce CI docs task log size.
- Update the relation to halide to the latest state.
2020-04-02 16:56:11 -07:00
Tianqi Chen 5b857d3c90 [DOCS] Reduce artifcats generated by sphinx gallery (#5208) 2020-04-01 19:44:42 -07:00
Tianqi Chen b776ff39d5 [DOCS] Point docs to the ASF site. (#5178)
* [DOCS] Point docs to the ASF site.

We have migrated the main docs to the ASF site,
which will be periodically updated using the docs generated by the CI.
Points the docs to the ASF version.

* [CI] Improve the docs generation script
2020-03-30 14:16:18 -07:00