Skip to content

Commit

Permalink
[ci] fix running cts tests that require device binaries
Browse files Browse the repository at this point in the history
Creating device binaries silently fails if SYCL isn't available.
  • Loading branch information
pbalcer committed Aug 31, 2023
1 parent c1bc465 commit 083f142
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ jobs:
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
strategy:
matrix:
adapter: [CUDA, HIP, L0]
adapter: [{name: CUDA, triplet: nvptx64-nvidia-cuda}, {name: HIP, triplet: amdgcn-amdhsa}, {name: L0, triplet: spir64}]
build_type: [Debug, Release]
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}]

runs-on: ${{matrix.adapter}}
runs-on: ${{matrix.adapter.name}}

steps:
- uses: actions/checkout@v3
Expand All @@ -214,8 +214,9 @@ jobs:

- name: Download DPC++
run: |
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2023-08-31/sycl_linux.tar.gz
mkdir dpcpp_compiler
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
- name: Configure CMake
run: >
Expand All @@ -227,11 +228,14 @@ jobs:
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DUR_BUILD_TESTS=ON
-DUR_BUILD_ADAPTER_${{matrix.adapter}}=ON
-DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
-DUR_CONFORMANCE_TARGET_TRIPLES=${{matrix.adapter.triplet}}
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
# This is so that device binaries can find the sycl runtime library
run: LD_LIBRARY_PATH=${{github.workspace}}/dpcpp_compiler/lib
cmake --build ${{github.workspace}}/build -j $(nproc)

# Temporarily disabling platform test for L0, because of hang
# See issue: #824
Expand Down
57 changes: 56 additions & 1 deletion test/conformance/enqueue/enqueue_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
Segmentation fault
urEnqueueDeviceGetGlobalVariableReadTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueDeviceGetGlobalVariableReadTest.InvalidEventWaitInvalidEvent/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueDeviceGetGlobalVariableWriteTest.InvalidEventWaitInvalidEvent/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueKernelLaunchWithVirtualMemory.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemBufferFillTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___size__256__patternSize__256
urEnqueueMemBufferFillTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___size__1024__patternSize__256
urEnqueueMemBufferMapTest.SuccessMultiMaps/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___1D
urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___2D
urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___3D
urEnqueueMemImageReadTest.InvalidOrigin1D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageReadTest.InvalidOrigin2D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageReadTest.InvalidOrigin3D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageReadTest.InvalidRegion1D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageReadTest.InvalidRegion2D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageReadTest.InvalidRegion3D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidOrigin1D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidOrigin2D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidOrigin3D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidRegion1D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidRegion2D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueMemImageWriteTest.InvalidRegion3D/NVIDIA_CUDA_BACKEND___{{.*}}_
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1__patternSize__1
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1__patternSize__256
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1__patternSize__4
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__57__height__1__patternSize__1
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1__patternSize__256
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1__patternSize__1024
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__1
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__256
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__65536
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__1__patternSize__1
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__35__patternSize__1
urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__35__patternSize__128
urEnqueueUSMFill2DNegativeTest.OutOfBounds/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urEnqueueUSMAdviseWithParamTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_ADVICE_FLAG_DEFAULT
{{OPT}}urEnqueueUSMAdviseTest.MultipleParamsSuccess/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__23
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__23
{{OPT}}urEnqueueUSMMemcpy2DTestWithParam.SuccessNonBlocking/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__1
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidNullHandleQueue/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidNullPointer/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMMemcpy2DNegativeTest.InvalidEventWaitList/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1
{{OPT}}urEnqueueUSMPrefetchWithParamTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
{{OPT}}urEnqueueUSMPrefetchWithParamTest.CheckWaitEvent/NVIDIA_CUDA_BACKEND___{{.*}}___UR_USM_MIGRATION_FLAG_DEFAULT
{{OPT}}Aborted
1 change: 1 addition & 0 deletions test/conformance/enqueue/enqueue_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
Segmentation fault
10 changes: 9 additions & 1 deletion test/conformance/kernel/kernel_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Segmentation fault
urKernelSetArgLocalTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urKernelSetArgLocalTest.InvalidNullHandleKernel/NVIDIA_CUDA_BACKEND___{{.*}}_
urKernelSetArgLocalTest.InvalidKernelArgumentIndex/NVIDIA_CUDA_BACKEND___{{.*}}_
urKernelSetArgMemObjTest.InvalidKernelArgumentIndex/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urKernelSetArgPointerNegativeTest.InvalidNullHandleKernel/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urKernelSetArgPointerNegativeTest.InvalidKernelArgumentIndex/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urKernelSetArgSamplerTest.InvalidKernelArgumentIndex/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}urKernelSetArgValueTest.InvalidKernelArgumentIndex/NVIDIA_CUDA_BACKEND___{{.*}}_
{{OPT}}Segmentation fault
25 changes: 24 additions & 1 deletion test/conformance/program/program_adapter_cuda.match
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
Segmentation fault
urProgramCreateWithNativeHandleTest.InvalidNullHandleContext/NVIDIA_CUDA_BACKEND___{{.*}}_
urProgramCreateWithNativeHandleTest.InvalidNullPointerProgram/NVIDIA_CUDA_BACKEND___{{.*}}_
urProgramGetBuildInfoTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_BINARY_TYPE
urProgramGetBuildInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_STATUS
urProgramGetBuildInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_OPTIONS
urProgramGetBuildInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_LOG
urProgramGetBuildInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_BINARY_TYPE
urProgramGetBuildInfoTest.InvalidNullHandleDevice/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_STATUS
urProgramGetBuildInfoTest.InvalidNullHandleDevice/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_OPTIONS
urProgramGetBuildInfoTest.InvalidNullHandleDevice/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_LOG
urProgramGetBuildInfoTest.InvalidNullHandleDevice/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_BUILD_INFO_BINARY_TYPE
urProgramGetInfoTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_NUM_KERNELS
urProgramGetInfoTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_KERNEL_NAMES
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_REFERENCE_COUNT
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_CONTEXT
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_NUM_DEVICES
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_DEVICES
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_SOURCE
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_BINARY_SIZES
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_BINARIES
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_NUM_KERNELS
urProgramGetInfoTest.InvalidNullHandleProgram/NVIDIA_CUDA_BACKEND___{{.*}}___UR_PROGRAM_INFO_KERNEL_NAMES
urProgramLinkTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_
urProgramSetSpecializationConstantsTest.Success/NVIDIA_CUDA_BACKEND___{{.*}}_

0 comments on commit 083f142

Please sign in to comment.