This is an automated email from the ASF dual-hosted git repository.

syfeng pushed a commit to branch unity_ci
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 17026f06c6bc712abbd7b7ef06c30a1c1146325a
Author: Siyuan Feng <[email protected]>
AuthorDate: Mon Nov 27 16:37:55 2023 +0800

    upd ci
---
 tests/scripts/unity/task_python_tir.sh         | 51 ++++++++++++++++++++++++++
 tests/scripts/unity/task_python_tir_gpuonly.sh | 27 ++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/tests/scripts/unity/task_python_tir.sh 
b/tests/scripts/unity/task_python_tir.sh
new file mode 100755
index 0000000000..30f5e8a4c9
--- /dev/null
+++ b/tests/scripts/unity/task_python_tir.sh
@@ -0,0 +1,51 @@
+#!/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
+
+# cleanup pycache
+find . -type f -path "*.pyc" | xargs rm -f
+make cython3
+
+# NOTE: also set by task_python_unittest_gpuonly.sh.
+if [ -z "${TVM_UNITTEST_TESTSUITE_NAME:-}" ]; then
+    TVM_UNITTEST_TESTSUITE_NAME=python-unittest
+fi
+
+# First run minimal test on both ctypes and cython.
+run_pytest ctypes ${TVM_UNITTEST_TESTSUITE_NAME}-platform-minimal-test-0 
tests/python/all-platform-minimal-test
+run_pytest cython ${TVM_UNITTEST_TESTSUITE_NAME}-platform-minimal-test-1 
tests/python/all-platform-minimal-test
+
+# Then run all unittests on both ctypes and cython.
+TEST_FILES=(
+  "tir-analysis"
+  "tir-base"
+  "tir-schedule"
+  "tir-transform"
+  "tir-usmp"
+)
+
+for TEST_FILE in ${TEST_FILES}; do
+    run_pytest ctypes ${TEST_FILE}-0, tests/python/${TEST_FILE}
+    run_pytest cython ${TEST_FILE}-1, tests/python/${TEST_FILE}
+done
+
+# Then run CI tests
+run_pytest ctypes ${TVM_UNITTEST_TESTSUITE_NAME}-ci tests/python/ci
diff --git a/tests/scripts/unity/task_python_tir_gpuonly.sh 
b/tests/scripts/unity/task_python_tir_gpuonly.sh
new file mode 100755
index 0000000000..a3c0da3296
--- /dev/null
+++ b/tests/scripts/unity/task_python_tir_gpuonly.sh
@@ -0,0 +1,27 @@
+#!/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 PYTEST_ADDOPTS="-m gpu ${PYTEST_ADDOPTS:-}"
+
+# Test most of the enabled runtimes here.
+export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;nvptx;opencl 
-device=mali,aocl_sw_emu"
+export TVM_UNITTEST_TESTSUITE_NAME=python-unittest-gpu
+
+./tests/scripts/unity/task_python_tir.sh
\ No newline at end of file

Reply via email to