From a0444a7c77d007856a1172113d96aacf8e21d99c Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Wed, 16 Nov 2022 08:58:11 +0300 Subject: [PATCH 1/8] [OpenCL][CI] Enable OpenCL cpp tests in CI --- tests/python/contrib/test_opencl/test_run_gtests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/python/contrib/test_opencl/test_run_gtests.py b/tests/python/contrib/test_opencl/test_run_gtests.py index ee59086b25f1..4afcf7ee8d66 100644 --- a/tests/python/contrib/test_opencl/test_run_gtests.py +++ b/tests/python/contrib/test_opencl/test_run_gtests.py @@ -28,7 +28,6 @@ # for example to run all "foo" tests twice and observe gtest output run # pytest -sv --gtests_args="--gtest_filter=*foo* --gtest_repeat=2" @tvm.testing.requires_opencl -@pytest.mark.skipif(tvm.testing.utils.IS_IN_CI, reason="failed due to nvidia libOpencl in the CI") def test_run_gtests(gtest_args): if ( "TVM_TRACKER_HOST" in os.environ From a7cd33613a2a0756bfd345bb6341800e7a0d02b5 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Wed, 16 Nov 2022 15:42:57 +0300 Subject: [PATCH 2/8] Add building gtest for OpenCL in GPU build --- tests/cpp-runtime/opencl/opencl_texture_pool_test.cc | 12 ++++++------ tests/scripts/task_config_build_gpu.sh | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc b/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc index 2d3f43ddce6d..50cb8c2ce049 100644 --- a/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc +++ b/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc @@ -31,13 +31,13 @@ using namespace tvm::runtime::cl; // get and check internal state of class Pool class PoolWrapper : public Pool2D { public: - inline size_t FreeListSize() const { return free_list_.size(); } - inline size_t AllocatedListSize() const { return allocated_.size(); } - inline std::pair FreeListItemSize(size_t idx) const { - return std::make_pair(free_list_[idx].x, free_list_[idx].y); + inline int FreeListSize() const { return static_cast(free_list_.size()); } + inline int AllocatedListSize() const { return static_cast(allocated_.size()); } + inline std::pair FreeListItemSize(size_t idx) const { + return std::make_pair(static_cast(free_list_[idx].x), static_cast(free_list_[idx].y)); } - inline std::pair AllocatedListItemSize(size_t idx) const { - return std::make_pair(allocated_[idx].x, allocated_[idx].y); + inline std::pair AllocatedListItemSize(size_t idx) const { + return std::make_pair(static_cast(allocated_[idx].x), static_cast(allocated_[idx].y)); } }; diff --git a/tests/scripts/task_config_build_gpu.sh b/tests/scripts/task_config_build_gpu.sh index ca5f3e935c08..90c91fb990be 100755 --- a/tests/scripts/task_config_build_gpu.sh +++ b/tests/scripts/task_config_build_gpu.sh @@ -29,6 +29,7 @@ echo set\(USE_CUDA ON\) >> config.cmake echo set\(USE_VULKAN ON\) >> config.cmake echo set\(USE_OPENGL ON\) >> config.cmake echo set\(USE_OPENCL ON\) >> config.cmake +echo set\(USE_OPENCL_GTEST \"/googletest\"\) >> config.cmake echo set\(USE_MICRO ON\) >> config.cmake echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake echo set\(USE_LLVM \"/usr/bin/llvm-config-9 --link-static\"\) >> config.cmake From 4a9a274a35d318976c9707938df38a2cecb5eba4 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Tue, 29 Nov 2022 12:53:20 +0300 Subject: [PATCH 3/8] Fix CI build --- CMakeLists.txt | 6 ++++-- tests/cpp-runtime/opencl/opencl_texture_pool_test.cc | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 736d516fa1f6..a7fa722a329c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -645,8 +645,10 @@ if(USE_OPENCL AND DEFINED USE_OPENCL_GTEST AND EXISTS ${USE_OPENCL_GTEST}) FetchContent_MakeAvailable(googletest) target_link_libraries(tvm_runtime PUBLIC gtest) target_link_libraries(tvm PUBLIC gtest) - include_directories("${USE_OPENCL_GTEST}/include") - include_directories("${USE_OPENCL_GTEST}/googletest/include") + if (NOT GTEST_FOUND) + include_directories("${USE_OPENCL_GTEST}/include") + include_directories("${USE_OPENCL_GTEST}/googletest/include") + endif() message(STATUS "Found OpenCL gtest at ${USE_OPENCL_GTEST}") endif() diff --git a/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc b/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc index 50cb8c2ce049..2d3f43ddce6d 100644 --- a/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc +++ b/tests/cpp-runtime/opencl/opencl_texture_pool_test.cc @@ -31,13 +31,13 @@ using namespace tvm::runtime::cl; // get and check internal state of class Pool class PoolWrapper : public Pool2D { public: - inline int FreeListSize() const { return static_cast(free_list_.size()); } - inline int AllocatedListSize() const { return static_cast(allocated_.size()); } - inline std::pair FreeListItemSize(size_t idx) const { - return std::make_pair(static_cast(free_list_[idx].x), static_cast(free_list_[idx].y)); + inline size_t FreeListSize() const { return free_list_.size(); } + inline size_t AllocatedListSize() const { return allocated_.size(); } + inline std::pair FreeListItemSize(size_t idx) const { + return std::make_pair(free_list_[idx].x, free_list_[idx].y); } - inline std::pair AllocatedListItemSize(size_t idx) const { - return std::make_pair(static_cast(allocated_[idx].x), static_cast(allocated_[idx].y)); + inline std::pair AllocatedListItemSize(size_t idx) const { + return std::make_pair(allocated_[idx].x, allocated_[idx].y); } }; From 9e72623b4f595e0778d9dc33c85f554786445693 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Fri, 9 Dec 2022 13:38:01 +0300 Subject: [PATCH 4/8] Change OpenCL cpp tests build approach --- CMakeLists.txt | 17 ------ ci/jenkins/generated/gpu_jenkinsfile.groovy | 8 +++ .../templates/gpu_jenkinsfile.groovy.j2 | 8 +++ cmake/modules/OpenCL.cmake | 12 +++- tests/cpp-runtime/opencl/run_gtests.cc | 60 ------------------- .../contrib/test_opencl/test_run_gtests.py | 55 ----------------- tests/scripts/ci.py | 1 + tests/scripts/task_opencl_cpp_unittest.sh | 40 +++++++++++++ 8 files changed, 68 insertions(+), 133 deletions(-) delete mode 100644 tests/cpp-runtime/opencl/run_gtests.cc delete mode 100644 tests/python/contrib/test_opencl/test_run_gtests.py create mode 100644 tests/scripts/task_opencl_cpp_unittest.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index a7fa722a329c..119bf8325c8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -638,20 +638,6 @@ if(BUILD_FOR_HEXAGON AND DEFINED USE_HEXAGON_GTEST AND EXISTS ${USE_HEXAGON_GTES include_directories("${USE_HEXAGON_GTEST}/include") endif() -if(USE_OPENCL AND DEFINED USE_OPENCL_GTEST AND EXISTS ${USE_OPENCL_GTEST}) - include(FetchContent) - FetchContent_Declare(googletest SOURCE_DIR "${USE_OPENCL_GTEST}") - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - FetchContent_MakeAvailable(googletest) - target_link_libraries(tvm_runtime PUBLIC gtest) - target_link_libraries(tvm PUBLIC gtest) - if (NOT GTEST_FOUND) - include_directories("${USE_OPENCL_GTEST}/include") - include_directories("${USE_OPENCL_GTEST}/googletest/include") - endif() - message(STATUS "Found OpenCL gtest at ${USE_OPENCL_GTEST}") -endif() - # Set flags for clang include(cmake/modules/ClangFlags.cmake) set(CRC16_INCLUDE_PATH "3rdparty/libcrc/include") @@ -717,9 +703,6 @@ install(TARGETS tvm_runtime EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_S if(BUILD_FOR_HEXAGON AND DEFINED USE_HEXAGON_GTEST AND EXISTS ${USE_HEXAGON_GTEST}) install(TARGETS gtest EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_SUFFIX}) endif() -if(USE_OPENCL AND DEFINED USE_OPENCL_GTEST AND EXISTS ${USE_OPENCL_GTEST}) - install(TARGETS gtest EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_SUFFIX}) -endif() if (INSTALL_DEV) install( diff --git a/ci/jenkins/generated/gpu_jenkinsfile.groovy b/ci/jenkins/generated/gpu_jenkinsfile.groovy index 48a6619cbab1..3fc74d121257 100644 --- a/ci/jenkins/generated/gpu_jenkinsfile.groovy +++ b/ci/jenkins/generated/gpu_jenkinsfile.groovy @@ -583,6 +583,14 @@ def shard_run_unittest_GPU_1_of_3() { script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_integration_gpuonly.sh", label: 'Run Python GPU integration tests', ) + sh ( + script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", + label: 'Make OpenCL cpp unit tests', + ) + sh ( + script: "${docker_run} ${ci_gpu} ./tests/scripts/task_opencl_cpp_unittest.sh", + label: 'Run OpenCL cpp unit tests', + ) }) } } finally { diff --git a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 index 2a9e7236d26d..4a5f43b1e7db 100644 --- a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 +++ b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 @@ -64,6 +64,14 @@ make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) micro_cpp_unittest(ci_gpu) + sh ( + script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", + label: 'Make OpenCL cpp unit tests', + ) + sh ( + script: "${docker_run} ${ci_gpu} ./tests/scripts/task_opencl_cpp_unittest.sh", + label: 'Run OpenCL cpp unit tests', + ) {% else %} {{ m.download_artifacts(tag='gpu') }} ci_setup(ci_gpu) diff --git a/cmake/modules/OpenCL.cmake b/cmake/modules/OpenCL.cmake index e738df7c564c..1e1041efe386 100644 --- a/cmake/modules/OpenCL.cmake +++ b/cmake/modules/OpenCL.cmake @@ -59,9 +59,19 @@ if(USE_OPENCL) endif() if(DEFINED USE_OPENCL_GTEST AND EXISTS ${USE_OPENCL_GTEST}) - file_glob_append(RUNTIME_OPENCL_SRCS + include(FetchContent) + FetchContent_Declare(googletest SOURCE_DIR "${USE_OPENCL_GTEST}") + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + FetchContent_MakeAvailable(googletest) + install(TARGETS gtest EXPORT ${PROJECT_NAME}Targets DESTINATION lib${LIB_SUFFIX}) + + message(STATUS "Found OpenCL gtest at ${USE_OPENCL_GTEST}") + + tvm_file_glob(GLOB_RECURSE OPENCL_TEST_SRCS "${CMAKE_SOURCE_DIR}/tests/cpp-runtime/opencl/*.cc" ) + add_executable(opencl-cpptest ${OPENCL_TEST_SRCS}) + target_link_libraries(opencl-cpptest PRIVATE gtest_main tvm_runtime) endif() list(APPEND RUNTIME_SRCS ${RUNTIME_OPENCL_SRCS}) else() diff --git a/tests/cpp-runtime/opencl/run_gtests.cc b/tests/cpp-runtime/opencl/run_gtests.cc deleted file mode 100644 index ffe86a7f52c0..000000000000 --- a/tests/cpp-runtime/opencl/run_gtests.cc +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -#include -#include -#include - -#include -#include - -#include "../src/support/utils.h" - -namespace tvm { -namespace runtime { -namespace cl { - -TVM_REGISTER_GLOBAL("opencl.run_gtests").set_body([](TVMArgs args, TVMRetValue* rv) { - // gtest args are passed into this packed func as a singular string - // split gtest args using delimiter and build argument vector - std::vector parsed_args = tvm::support::Split(args[0], ' '); - std::vector argv; - - // add executable name - argv.push_back(const_cast("opencl_run_gtests")); - - // add parsed arguments - for (size_t i = 0; i < parsed_args.size(); ++i) { - argv.push_back(const_cast(parsed_args[i].data())); - } - - // end of parsed arguments - argv.push_back(nullptr); - - // set argument count - int argc = argv.size() - 1; - - // initialize gtest with arguments and run - ::testing::InitGoogleTest(&argc, argv.data()); - *rv = RUN_ALL_TESTS(); -}); - -} // namespace cl -} // namespace runtime -} // namespace tvm diff --git a/tests/python/contrib/test_opencl/test_run_gtests.py b/tests/python/contrib/test_opencl/test_run_gtests.py deleted file mode 100644 index 4afcf7ee8d66..000000000000 --- a/tests/python/contrib/test_opencl/test_run_gtests.py +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -import os -import pytest -import numpy as np - -import tvm -from tvm import rpc - - -# use pytest -sv to observe gtest output -# use --gtest_args to pass arguments to gtest -# for example to run all "foo" tests twice and observe gtest output run -# pytest -sv --gtests_args="--gtest_filter=*foo* --gtest_repeat=2" -@tvm.testing.requires_opencl -def test_run_gtests(gtest_args): - if ( - "TVM_TRACKER_HOST" in os.environ - and "TVM_TRACKER_PORT" in os.environ - and "TVM_TRACKER_KEY" in os.environ - ): - rpc_tracker_host = os.environ["TVM_TRACKER_HOST"] - rpc_tracker_port = os.environ["TVM_TRACKER_PORT"] - rpc_tracker_port = int(rpc_tracker_port) - rpc_key = os.environ["TVM_TRACKER_KEY"] - tracker = rpc.connect_tracker(rpc_tracker_host, rpc_tracker_port) - rpc_connection = tracker.request(rpc_key, priority=0, session_timeout=600) - else: - rpc_connection = rpc.LocalSession() - - try: - func = rpc_connection.get_function("opencl.run_gtests") - except: - print( - "This test requires TVM Runtime to be built with a OpenCL gtest version using OpenCL API cmake flag -DUSE_OPENCL_GTEST=/path/to/opencl/googletest/gtest" - ) - raise - - gtest_error_code = func(gtest_args) - np.testing.assert_equal(gtest_error_code, 0) diff --git a/tests/scripts/ci.py b/tests/scripts/ci.py index 6799f68d43b7..d7ab5c244fe7 100755 --- a/tests/scripts/ci.py +++ b/tests/scripts/ci.py @@ -588,6 +588,7 @@ def add_subparser( help="Run GPU build and test(s)", options={ "cpp": CPP_UNITTEST, + "opencl_unittest": ("run opencl unit tests", ["./tests/scripts/task_opencl_cpp_unittest.sh"]), "topi": ("run topi tests", ["./tests/scripts/task_python_topi.sh"]), "unittest": ( "run unit tests", diff --git a/tests/scripts/task_opencl_cpp_unittest.sh b/tests/scripts/task_opencl_cpp_unittest.sh new file mode 100644 index 000000000000..a7a683a5ef89 --- /dev/null +++ b/tests/scripts/task_opencl_cpp_unittest.sh @@ -0,0 +1,40 @@ +#!/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 + +if [ $# -gt 0 ]; then + BUILD_DIR="$1" +elif [ -n "${TVM_BUILD_PATH:-}" ]; then + # TVM_BUILD_PATH may contain multiple space-separated paths. If + # so, use the first one. + BUILD_DIR=$(IFS=" "; set -- $TVM_BUILD_PATH; echo $1) +else + BUILD_DIR=build +fi + + +# to avoid CI thread throttling. +export TVM_BIND_THREADS=0 +export OMP_NUM_THREADS=1 + +pushd "${BUILD_DIR}" +# run cpp test executable +./opencl-cpptest +popd + From d776ac416e361183ca6b96cd893271c8762ffd04 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Fri, 9 Dec 2022 13:56:08 +0300 Subject: [PATCH 5/8] Fix lint --- ci/jenkins/generated/gpu_jenkinsfile.groovy | 16 ++++++++-------- tests/scripts/ci.py | 5 ++++- tests/scripts/task_opencl_cpp_unittest.sh | 1 - 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ci/jenkins/generated/gpu_jenkinsfile.groovy b/ci/jenkins/generated/gpu_jenkinsfile.groovy index 3fc74d121257..aafd722e4376 100644 --- a/ci/jenkins/generated/gpu_jenkinsfile.groovy +++ b/ci/jenkins/generated/gpu_jenkinsfile.groovy @@ -575,14 +575,6 @@ def shard_run_unittest_GPU_1_of_3() { make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) micro_cpp_unittest(ci_gpu) - sh ( - script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_unittest_gpuonly.sh", - label: 'Run Python GPU unit tests', - ) - sh ( - script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_integration_gpuonly.sh", - label: 'Run Python GPU integration tests', - ) sh ( script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", label: 'Make OpenCL cpp unit tests', @@ -591,6 +583,14 @@ def shard_run_unittest_GPU_1_of_3() { script: "${docker_run} ${ci_gpu} ./tests/scripts/task_opencl_cpp_unittest.sh", label: 'Run OpenCL cpp unit tests', ) + sh ( + script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_unittest_gpuonly.sh", + label: 'Run Python GPU unit tests', + ) + sh ( + script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_integration_gpuonly.sh", + label: 'Run Python GPU integration tests', + ) }) } } finally { diff --git a/tests/scripts/ci.py b/tests/scripts/ci.py index d7ab5c244fe7..bb5d64ec1822 100755 --- a/tests/scripts/ci.py +++ b/tests/scripts/ci.py @@ -588,7 +588,10 @@ def add_subparser( help="Run GPU build and test(s)", options={ "cpp": CPP_UNITTEST, - "opencl_unittest": ("run opencl unit tests", ["./tests/scripts/task_opencl_cpp_unittest.sh"]), + "opencl_unittest": ( + "run opencl unit tests", + ["./tests/scripts/task_opencl_cpp_unittest.sh"], + ), "topi": ("run topi tests", ["./tests/scripts/task_python_topi.sh"]), "unittest": ( "run unit tests", diff --git a/tests/scripts/task_opencl_cpp_unittest.sh b/tests/scripts/task_opencl_cpp_unittest.sh index a7a683a5ef89..7ea6ea470db7 100644 --- a/tests/scripts/task_opencl_cpp_unittest.sh +++ b/tests/scripts/task_opencl_cpp_unittest.sh @@ -37,4 +37,3 @@ pushd "${BUILD_DIR}" # run cpp test executable ./opencl-cpptest popd - From b755099cc5d395dd9a5ff3e2ce811894499a6234 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Fri, 9 Dec 2022 16:13:03 +0300 Subject: [PATCH 6/8] Try to enable test in CI --- ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 | 2 +- tests/scripts/ci.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 index 4a5f43b1e7db..40698131a783 100644 --- a/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 +++ b/ci/jenkins/templates/gpu_jenkinsfile.groovy.j2 @@ -63,7 +63,6 @@ make_standalone_crt(ci_gpu, 'build') make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) - micro_cpp_unittest(ci_gpu) sh ( script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", label: 'Make OpenCL cpp unit tests', @@ -72,6 +71,7 @@ script: "${docker_run} ${ci_gpu} ./tests/scripts/task_opencl_cpp_unittest.sh", label: 'Run OpenCL cpp unit tests', ) + micro_cpp_unittest(ci_gpu) {% else %} {{ m.download_artifacts(tag='gpu') }} ci_setup(ci_gpu) diff --git a/tests/scripts/ci.py b/tests/scripts/ci.py index bb5d64ec1822..b11ee538dc68 100755 --- a/tests/scripts/ci.py +++ b/tests/scripts/ci.py @@ -588,15 +588,12 @@ def add_subparser( help="Run GPU build and test(s)", options={ "cpp": CPP_UNITTEST, - "opencl_unittest": ( - "run opencl unit tests", - ["./tests/scripts/task_opencl_cpp_unittest.sh"], - ), "topi": ("run topi tests", ["./tests/scripts/task_python_topi.sh"]), "unittest": ( "run unit tests", [ "./tests/scripts/task_java_unittest.sh", + "./tests/scripts/task_opencl_cpp_unittest.sh", "./tests/scripts/task_python_unittest_gpuonly.sh", "./tests/scripts/task_python_integration_gpuonly.sh", ], From e7c93c3b79746194bc9c536beb9e08d25f4f0eca Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Fri, 9 Dec 2022 22:38:13 +0300 Subject: [PATCH 7/8] Update version of gpu docker image --- ci/jenkins/docker-images.ini | 2 +- ci/jenkins/generated/gpu_jenkinsfile.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/jenkins/docker-images.ini b/ci/jenkins/docker-images.ini index 119a43218642..40e1b8a1313f 100644 --- a/ci/jenkins/docker-images.ini +++ b/ci/jenkins/docker-images.ini @@ -20,7 +20,7 @@ ci_arm: tlcpack/ci-arm:20221013-060115-61c9742ea ci_cortexm: tlcpack/ci-cortexm:20221013-060115-61c9742ea ci_cpu: tlcpack/ci-cpu:20221013-060115-61c9742ea -ci_gpu: tlcpack/ci-gpu:20221019-060125-0b4836739 +ci_gpu: tlcpack/ci-gpu:20221128-070141-ae4fd7df7 ci_hexagon: tlcpack/ci-hexagon:20221013-060115-61c9742ea ci_i386: tlcpack/ci-i386:20221013-060115-61c9742ea ci_lint: tlcpack/ci-lint:20221013-060115-61c9742ea diff --git a/ci/jenkins/generated/gpu_jenkinsfile.groovy b/ci/jenkins/generated/gpu_jenkinsfile.groovy index aafd722e4376..3c9dbbc1477c 100644 --- a/ci/jenkins/generated/gpu_jenkinsfile.groovy +++ b/ci/jenkins/generated/gpu_jenkinsfile.groovy @@ -574,7 +574,6 @@ def shard_run_unittest_GPU_1_of_3() { make_standalone_crt(ci_gpu, 'build') make_cpp_tests(ci_gpu, 'build') cpp_unittest(ci_gpu) - micro_cpp_unittest(ci_gpu) sh ( script: "${docker_run} ${ci_gpu} python3 ./tests/scripts/task_build.py --sccache-bucket tvm-sccache-prod --cmake-target opencl-cpptest --build-dir build", label: 'Make OpenCL cpp unit tests', @@ -583,6 +582,7 @@ def shard_run_unittest_GPU_1_of_3() { script: "${docker_run} ${ci_gpu} ./tests/scripts/task_opencl_cpp_unittest.sh", label: 'Run OpenCL cpp unit tests', ) + micro_cpp_unittest(ci_gpu) sh ( script: "${docker_run} ${ci_gpu} ./tests/scripts/task_python_unittest_gpuonly.sh", label: 'Run Python GPU unit tests', From 24b01c31e47998a72c0f2330a75fd7bb60b28511 Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Mon, 12 Dec 2022 09:38:33 +0300 Subject: [PATCH 8/8] Change script mod --- tests/scripts/task_opencl_cpp_unittest.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tests/scripts/task_opencl_cpp_unittest.sh diff --git a/tests/scripts/task_opencl_cpp_unittest.sh b/tests/scripts/task_opencl_cpp_unittest.sh old mode 100644 new mode 100755