Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
[UnitTests] Enable minimum testing on Vulkan target in CI
- Include the Vulkan runtime in the GPU build.

- Run test_target_codegen_vulkan.py as part of the `python3: GPU` CI step.
  • Loading branch information
Lunderberg committed Sep 23, 2021
commit ea3e0df3e50340fa7a82369885942f031e04cdd2
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ stage('Build') {
make(ci_gpu, 'build', '-j2')
pack_lib('gpu', tvm_multilib)
// compiler test
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_vulkan.sh"
sh "${docker_run} ${ci_gpu} ./tests/scripts/task_config_build_gpu_rocm.sh"
make(ci_gpu, 'build2', '-j2')
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/scripts/task_config_build_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cp ../cmake/config.cmake .
echo set\(USE_CUBLAS ON\) >> config.cmake
echo set\(USE_CUDNN ON\) >> config.cmake
echo set\(USE_CUDA ON\) >> config.cmake
echo set\(USE_VULKAN ON\) >> config.cmake
echo set\(USE_OPENGL ON\) >> config.cmake
echo set\(USE_MICRO ON\) >> config.cmake
echo set\(USE_MICRO_STANDALONE_RUNTIME ON\) >> config.cmake
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ cp ../cmake/config.cmake .

echo set\(USE_OPENCL ON\) >> config.cmake
echo set\(USE_ROCM ON\) >> config.cmake
echo set\(USE_VULKAN ON\) >> config.cmake
echo set\(USE_MICRO ON\) >> config.cmake
echo set\(USE_PROFILER ON\) >> config.cmake
echo set\(USE_LIBBACKTRACE OFF\) >> config.cmake
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/task_python_integration_gpuonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# specific language governing permissions and limitations
# under the License.

export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;vulkan;nvptx;opencl -device=mali,aocl_sw_emu"
export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;nvptx;opencl -device=mali,aocl_sw_emu"
export PYTEST_ADDOPTS="-m gpu $PYTEST_ADDOPTS"
export TVM_RELAY_TEST_TARGETS="cuda"
export TVM_INTEGRATION_TESTSUITE_NAME=python-integration-gpu
Expand Down
15 changes: 14 additions & 1 deletion tests/scripts/task_python_unittest_gpuonly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,21 @@
# specific language governing permissions and limitations
# under the License.

export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;vulkan;nvptx;opencl -device=mali,aocl_sw_emu"
set -euo pipefail

export TVM_TEST_TARGETS="cuda;opencl;metal;rocm;nvptx;opencl -device=mali,aocl_sw_emu"
export PYTEST_ADDOPTS="-m gpu $PYTEST_ADDOPTS"
export TVM_UNITTEST_TESTSUITE_NAME=python-unittest-gpu

./tests/scripts/task_python_unittest.sh

# Kept separate to avoid increasing time needed to run CI, testing
# only minimal functionality of Vulkan runtime.
export TVM_TEST_TARGETS="vulkan -from_device=0"
export PYTEST_ADDOPTS="-m gpu $PYTEST_ADDOPTS"
export TVM_UNITTEST_TESTSUITE_NAME=python-unittest-vulkan

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

run_pytest ctypes ${TVM_UNITTEST_TESTSUITE_NAME} tests/python/unittest/test_target_codegen_vulkan.py
run_pytest cython ${TVM_UNITTEST_TESTSUITE_NAME} tests/python/unittest/test_target_codegen_vulkan.py