This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch ci-cleanup in repository https://gitbox.apache.org/repos/asf/tvm.git
commit f91e9d92eec3fcded85cc4198fad5a180e1fb918 Author: tqchen <[email protected]> AuthorDate: Tue Feb 10 11:17:33 2026 -0500 [CI][TEST] Cleanup legacy tests and migrate unity tests to main one This PR cleanups legacy test scripts and moves the unity tests to main one so we don't need to have separate unity pipeline. --- .asf.yaml | 1 - .github/workflows/main.yml | 62 +----------------------- tests/scripts/task_config_build_jvm.sh | 33 ------------- tests/scripts/task_config_build_mrvl.sh | 33 ------------- tests/scripts/task_golang.sh | 33 ------------- tests/scripts/task_python_arm_compute_library.sh | 27 ----------- tests/scripts/task_python_integration.sh | 6 +++ tests/scripts/task_python_topi.sh | 27 ----------- tests/scripts/task_python_unittest.sh | 1 + tests/scripts/task_rust.sh | 61 ----------------------- tests/scripts/unity/task_extra_lint.sh | 23 --------- tests/scripts/unity/task_python_relax.sh | 17 ------- tests/scripts/unity/task_python_relax_gpuonly.sh | 2 - 13 files changed, 8 insertions(+), 318 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index ac1cf1a707..0875829f93 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -58,7 +58,6 @@ github: main: required_status_checks: contexts: - - unity/pr-head - arm/pr-head - cpu/pr-head - docker/pr-head diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7b55dade14..66f8341c86 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,22 +58,7 @@ jobs: shell: bash -l {0} run: | pip install dist/*.whl -# - name: Build iOS RPC -# run: | -# IOS_VERSION="14.0" -# CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \ -# -DCMAKE_SYSTEM_NAME=iOS \ -# -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \ -# -DCMAKE_OSX_SYSROOT=iphonesimulator \ -# -DCMAKE_OSX_ARCHITECTURES=x86_64 \ -# -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \ -# -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \ -# -DUSE_IOS_RPC=ON" -# -# mkdir build-ios-simulator -# cd build-ios-simulator -# cmake .. ${CMAKE_FLAGS} -# cmake --build . --target ios_rpc + - name: Test shell: bash -l {0} run: >- @@ -89,14 +74,6 @@ jobs: python -m pytest -v -s 'tests/python/codegen/test_target_codegen_metal.py' python -m pytest -v -s 'tests/python/codegen/test_target_codegen_gpu_common.py' python -m pytest -v -s 'tests/python/codegen/test_gpu_codegen_allreduce.py::test_allreduce_sum[dims0-metal]' -# - name: Test iOS RPC -# shell: bash -l {0} -# run: >- -# python -m pip install tornado psutil cloudpickle && -# export PYTHONPATH=tests/python/contrib:${PYTHONPATH} && -# export BUNDLE_ID=org.apache.tvmrpc && -# export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app && -# python -m pytest -v tests/python/contrib/test_rpc_server_device.py Windows: if: ${{ github.repository == 'apache/tvm' }} @@ -125,40 +102,3 @@ jobs: shell: cmd /C call {0} run: >- python -m pytest -v tests/python/all-platform-minimal-test - - # Android: - # if: ${{ github.repository == 'apache/tvm' }} - # runs-on: ubuntu-22.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # submodules: 'recursive' - # - name: Set up environment - # uses: ./.github/actions/setup - # - name: Set up java - # uses: actions/setup-java@v3 - # with: - # distribution: 'zulu' - # java-version: '11' - # - name: Build TVM - # shell: bash -l {0} - # run: | - # mkdir build - # cd build - # ../tests/scripts/task_config_build_jvm.sh . - # cmake .. - # make - # - name: Build TVM4J - # run: | - # make jvmpkg - # - name: Build android_rpc - # working-directory: apps/android_rpc - # run: | - # set -eux - # export PATH="${ANDROID_NDK_LATEST_HOME}:$PATH" - # gradle clean build - # - name: Upload android_rpc APK - # uses: actions/upload-artifact@v4 - # with: - # name: android_rpc-debug.apk - # path: ./apps/android_rpc/app/build/outputs/apk/debug/app-debug.apk diff --git a/tests/scripts/task_config_build_jvm.sh b/tests/scripts/task_config_build_jvm.sh deleted file mode 100755 index 593f226f6c..0000000000 --- a/tests/scripts/task_config_build_jvm.sh +++ /dev/null @@ -1,33 +0,0 @@ - -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -e -set -u - -BUILD_DIR=$1 -mkdir -p "$BUILD_DIR" -cd "$BUILD_DIR" -cp ../cmake/config.cmake . - -echo set\(USE_SORT ON\) >> config.cmake -echo set\(USE_RPC ON\) >> config.cmake -echo set\(CMAKE_CXX_FLAGS -Werror\) >> config.cmake -echo set\(USE_CCACHE OFF\) >> config.cmake -echo set\(SUMMARIZE ON\) >> config.cmake -echo set\(USE_LLVM ON\) >> config.cmake diff --git a/tests/scripts/task_config_build_mrvl.sh b/tests/scripts/task_config_build_mrvl.sh deleted file mode 100755 index cb5adeab38..0000000000 --- a/tests/scripts/task_config_build_mrvl.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -BUILD_DIR=$1 -mkdir -p "$BUILD_DIR" -cd "$BUILD_DIR" -cp ../cmake/config.cmake . - -echo set\(USE_LLVM \"/usr/bin/llvm-config-15 --link-static\"\) >> config.cmake -echo set\(CMAKE_CXX_FLAGS \"-Werror -Wno-error=range-loop-construct\"\) >> config.cmake -echo set\(USE_LIBBACKTRACE COMPILE\) >> config.cmake -echo set\(BACKTRACE_ON_SEGFAULT ON\) >> config.cmake - -# Enable Mrvl target -echo set\(USE_MRVL ON\) >> config.cmake -echo set\(HIDE_PRIVATE_SYMBOLS ON\) >> config.cmake diff --git a/tests/scripts/task_golang.sh b/tests/scripts/task_golang.sh deleted file mode 100755 index 62eb8081eb..0000000000 --- a/tests/scripts/task_golang.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}" - -tvm_root="$(git rev-parse --show-toplevel)" -export PYTHONPATH="$tvm_root/python" - -# to avoid CI CPU thread throttling. -export TVM_BIND_THREADS=0 -export OMP_NUM_THREADS=1 - -make -C golang clean - -# Golang tests -make -C golang tests diff --git a/tests/scripts/task_python_arm_compute_library.sh b/tests/scripts/task_python_arm_compute_library.sh deleted file mode 100755 index b67724308f..0000000000 --- a/tests/scripts/task_python_arm_compute_library.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -source tests/scripts/setup-pytest-env.sh - - -find . -type f -path "*.pyc" | xargs rm -f - -# setup tvm-ffi into python folder -python3 -m pip install -v --target=python ./3rdparty/tvm-ffi/ diff --git a/tests/scripts/task_python_integration.sh b/tests/scripts/task_python_integration.sh index a1a0068ac9..7fb79593c0 100755 --- a/tests/scripts/task_python_integration.sh +++ b/tests/scripts/task_python_integration.sh @@ -35,3 +35,9 @@ find . -type f -path "*.pyc" | xargs rm -f # setup tvm-ffi into python folder python3 -m pip install -v --target=python ./3rdparty/tvm-ffi/ + +# Test for MSC +pytest tests/python/contrib/test_msc + +# Test for OpenCLML +pytest tests/python/relax/backend/clml/ diff --git a/tests/scripts/task_python_topi.sh b/tests/scripts/task_python_topi.sh deleted file mode 100755 index 9cb1fd476e..0000000000 --- a/tests/scripts/task_python_topi.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -source tests/scripts/setup-pytest-env.sh - -export TVM_TEST_TARGETS="llvm; cuda" - -# to avoid CI thread throttling. -export TVM_BIND_THREADS=0 -export OMP_NUM_THREADS=1 diff --git a/tests/scripts/task_python_unittest.sh b/tests/scripts/task_python_unittest.sh index 3619b51e79..25bdc94382 100755 --- a/tests/scripts/task_python_unittest.sh +++ b/tests/scripts/task_python_unittest.sh @@ -54,6 +54,7 @@ TEST_FILES=( "tir-base" "tir-transform" "tvmscript" + "relax" ) for TEST_FILE in ${TEST_FILES[@]}; do diff --git a/tests/scripts/task_rust.sh b/tests/scripts/task_rust.sh deleted file mode 100755 index b1157c22b5..0000000000 --- a/tests/scripts/task_rust.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -# skip rust tests for now because of out of sync to latest FFI -exit 0 - -export TVM_HOME="$(git rev-parse --show-toplevel)" -echo "Using TVM_HOME=$TVM_HOME" -export LD_LIBRARY_PATH="$TVM_HOME/lib:$TVM_HOME/build:${LD_LIBRARY_PATH:-}" -echo "Using LD_LIBRARY_PATH=$LD_LIBRARY_PATH" -export PYTHONPATH="$TVM_HOME/python:${PYTHONPATH}" -echo "Using PYTHONPATH=$PYTHONPATH" -export RUST_DIR="$TVM_HOME/rust" -echo "Using RUST_DIR=$RUST_DIR" - -export LLVM_CONFIG_DEFAULT=`which llvm-config-10` -export LLVM_CONFIG_PATH="${LLVM_CONFIG_PATH:-$LLVM_CONFIG_DEFAULT}" - -echo "Using LLVM_CONFIG_PATH=$LLVM_CONFIG_PATH" - -TVM_RUSTC_VERSION=`rustc --version` -echo "Using TVM_RUSTC_VERSION=$TVM_RUSTC_VERSION" - -TVM_CARGO_VERSION=`cargo --version` -echo "Using TVM_CARGO_VERSION=$TVM_CARGO_VERSION" - -# to avoid CI CPU thread throttling. -export TVM_BIND_THREADS=0 -export OMP_NUM_THREADS=1 - -# First we test tvm-sys the core Rust bindings. -cd $RUST_DIR/tvm-sys -# First we test w/o the bindings feature on. -cargo build -cargo test --features static-linking --tests - -# Second we test w/ the bindings feature on. -cargo build --features dynamic-linking -cargo test --features dynamic-linking --tests - -# Next we test the runtime API. -cd $RUST_DIR/tvm-rt -# Build and run the tests. -cargo test diff --git a/tests/scripts/unity/task_extra_lint.sh b/tests/scripts/unity/task_extra_lint.sh deleted file mode 100755 index 989f4df738..0000000000 --- a/tests/scripts/unity/task_extra_lint.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -set -euxo pipefail - -source tests/scripts/setup-pytest-env.sh - -# place extra lint here. diff --git a/tests/scripts/unity/task_python_relax.sh b/tests/scripts/unity/task_python_relax.sh index 4af875830e..5b55e1528c 100755 --- a/tests/scripts/unity/task_python_relax.sh +++ b/tests/scripts/unity/task_python_relax.sh @@ -24,20 +24,3 @@ export LD_LIBRARY_PATH="build:${LD_LIBRARY_PATH:-}" # to avoid CI CPU thread throttling. export TVM_BIND_THREADS=0 export TVM_NUM_THREADS=2 - -# setup tvm-ffi into python folder -python3 -m pip install -v --target=python ./3rdparty/tvm-ffi/ - -# Run Relax tests -TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm}" pytest tests/python/relax - -# Run Relax examples -# python3 ./apps/relax_examples/mlp.py -# python3 ./apps/relax_examples/nn_module.py -# python3 ./apps/relax_examples/resnet.py - -# Test for MSC -pytest tests/python/contrib/test_msc - -# Test for OpenCLML -pytest tests/python/relax/backend/clml/ diff --git a/tests/scripts/unity/task_python_relax_gpuonly.sh b/tests/scripts/unity/task_python_relax_gpuonly.sh index 19ab942a11..731968ed12 100755 --- a/tests/scripts/unity/task_python_relax_gpuonly.sh +++ b/tests/scripts/unity/task_python_relax_gpuonly.sh @@ -21,5 +21,3 @@ export PYTEST_ADDOPTS="-m gpu $PYTEST_ADDOPTS" export TVM_RELAY_TEST_TARGETS="cuda;opencl" export TVM_INTEGRATION_TESTSUITE_NAME=python-integration-gpu export TVM_INTEGRATION_GPU_ONLY=1 - -./tests/scripts/unity/task_python_relax.sh
