Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unity][CI] setup CI (do not upstream to main) #13902

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/scripts/task_convert_scripts_to_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# under the License.
set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this logic into the Jenkins scripts themselves before any node(...) calls are made? Doing it here still allocates machines, runs the docker setup, etc. which is not that much but expensive to end up doing nothing


SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}")
TVM_DIR=$(cd "${SCRIPTS_DIR}" && git rev-parse --show-toplevel)
python3 "${TVM_DIR}/docs/script_convert.py" "${TVM_DIR}/gallery/how_to/work_with_microtvm/micro_tvmc.sh"
3 changes: 3 additions & 0 deletions tests/scripts/task_cpp_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

if [ $# -gt 0 ]; then
BUILD_DIR="$1"
elif [ -n "${TVM_BUILD_PATH:-}" ]; then
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_demo_microtvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

pushd apps/microtvm/cmsisnn
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"

tvm_root="$(git rev-parse --show-toplevel)"
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_java_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export PYTHONPATH=python
export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"

Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_microtvm_cpp_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

BUILD_DIR=$1

# Python is required by apps/bundle_deploy
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_mypy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

echo "Checking MyPy Type defs in the TensorIR schedule package."
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_opencl_cpp_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

if [ $# -gt 0 ]; then
BUILD_DIR="$1"
elif [ -n "${TVM_BUILD_PATH:-}" ]; then
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_adreno.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export TVM_TEST_TARGETS="opencl"
export TVM_RELAY_OPENCL_TEXTURE_TARGETS="opencl -device=adreno"

Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_arm_compute_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh


Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_ethosn_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh


Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh
# to avoid openblas threading error
export TVM_BIND_THREADS=0
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_frontend_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# Test frontends that only need CPU resources
set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh
# to avoid openblas threading error
export TVM_BIND_THREADS=0
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_hexagon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

device_serial="simulator"
if [ $# -ge 1 ] && [[ "$1" = "--device" ]]; then
shift 1
Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/task_python_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ find . -type f -path "*.pyc" | xargs rm -f
# Test TVM
make cython3

# Test Relax and skip other tests (DO NOT UPSTREAM TO MAIN)
TVM_TEST_TARGETS="${TVM_RELAY_TEST_TARGETS:-llvm}" tests/scripts/unity/task_relax.sh
exit 0

# Test extern package
cd apps/extension
rm -rf lib
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_integration_gpuonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -exo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;nvptx;opencl -device=mali,aocl_sw_emu,adreno"
export PYTEST_ADDOPTS="-m gpu $PYTEST_ADDOPTS"
export TVM_RELAY_TEST_TARGETS="cuda"
Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/task_python_integration_i386only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# under the License.
set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export TVM_INTEGRATION_I386_ONLY=1

Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/task_python_microtvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

# Rebuild cython
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_topi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

export TVM_TEST_TARGETS="llvm; cuda"
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

# cleanup pycache
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_unittest_gpuonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export PYTEST_ADDOPTS="-m gpu ${PYTEST_ADDOPTS:-}"

# Test most of the enabled runtimes here.
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_vta_fsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh
# to avoid CI thread throttling.
export TVM_BIND_THREADS=0
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_python_vta_tsim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh
export PYTHONPATH=${PYTHONPATH}:${TVM_PATH}/vta/python
export VTA_HW_PATH=`pwd`/3rdparty/vta-hw
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_riscv_microtvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

source tests/scripts/setup-pytest-env.sh

make cython3
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
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:-}"
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/task_web_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

set -euxo pipefail

# SKIP: DO NOT UPSTREAM TO MAIN
exit 0

export PYTHONPATH=`pwd`/python

rm -rf .emscripten_cache
Expand Down
21 changes: 21 additions & 0 deletions tests/scripts/unity/task_relax.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/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

pytest tests/python/relax