From 50367c196bc368976fe694440ce4dfa9cc8ac5c8 Mon Sep 17 00:00:00 2001 From: pbalcer Date: Thu, 31 Aug 2023 15:30:02 +0200 Subject: [PATCH] [ci] fix running cts tests that require device binaries Creating device binaries silently fails if SYCL isn't available. --- .github/workflows/cmake.yml | 24 +++++--- .../enqueue/enqueue_adapter_cuda.match | 57 ++++++++++++++++++- .../enqueue/enqueue_adapter_level_zero.match | 1 + .../kernel/kernel_adapter_cuda.match | 10 +++- .../program/program_adapter_cuda.match | 25 +++++++- 5 files changed, 106 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bd1c28d26a..41d6fec0bc 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -200,11 +200,15 @@ 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: spir64}, # should be amdgcn-amdhsa, but build scripts for device binaries are currently broken for this target. + {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 @@ -214,8 +218,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: > @@ -227,21 +232,24 @@ 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 - name: Test L0 adapter - if: matrix.adapter == 'L0' + if: matrix.adapter.name == 'L0' working-directory: ${{github.workspace}}/build run: ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "platform-adapter_level_zero" --timeout 180 - name: Test adapters - if: matrix.adapter != 'L0' + if: matrix.adapter.name != 'L0' working-directory: ${{github.workspace}}/build run: ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180 diff --git a/test/conformance/enqueue/enqueue_adapter_cuda.match b/test/conformance/enqueue/enqueue_adapter_cuda.match index 7a1c0d5b8e..34f01d0644 100644 --- a/test/conformance/enqueue/enqueue_adapter_cuda.match +++ b/test/conformance/enqueue/enqueue_adapter_cuda.match @@ -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___{{.*}}_ +{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___1D +{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___2D +{{OPT}}urEnqueueMemImageCopyTest.InvalidSize/NVIDIA_CUDA_BACKEND___{{.*}}___3D +{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin1D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin2D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin3D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageReadTest.InvalidRegion1D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageReadTest.InvalidRegion2D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageReadTest.InvalidRegion3D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidOrigin1D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidOrigin2D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidOrigin3D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidRegion1D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidRegion2D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueMemImageWriteTest.InvalidRegion3D/NVIDIA_CUDA_BACKEND___{{.*}}_ +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1__width__1__height__1__patternSize__1 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1__patternSize__256 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__1__patternSize__4 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__57__height__1__patternSize__1 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1__patternSize__256 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__1024__height__1__patternSize__1024 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__1 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__256 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__256__patternSize__65536 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__1__patternSize__1 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__234__width__233__height__35__patternSize__1 +{{OPT}}urEnqueueUSMFill2DTestWithParam.Success/NVIDIA_CUDA_BACKEND___{{.*}}___pitch__1024__width__256__height__35__patternSize__128 +{{OPT}}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 \ No newline at end of file diff --git a/test/conformance/enqueue/enqueue_adapter_level_zero.match b/test/conformance/enqueue/enqueue_adapter_level_zero.match index 7a1c0d5b8e..089312bd0d 100644 --- a/test/conformance/enqueue/enqueue_adapter_level_zero.match +++ b/test/conformance/enqueue/enqueue_adapter_level_zero.match @@ -1 +1,2 @@ +urEnqueueDeviceGetGlobalVariableReadTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_ Segmentation fault diff --git a/test/conformance/kernel/kernel_adapter_cuda.match b/test/conformance/kernel/kernel_adapter_cuda.match index 7a1c0d5b8e..959fae09f5 100644 --- a/test/conformance/kernel/kernel_adapter_cuda.match +++ b/test/conformance/kernel/kernel_adapter_cuda.match @@ -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 diff --git a/test/conformance/program/program_adapter_cuda.match b/test/conformance/program/program_adapter_cuda.match index 7a1c0d5b8e..57c00e7a36 100644 --- a/test/conformance/program/program_adapter_cuda.match +++ b/test/conformance/program/program_adapter_cuda.match @@ -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___{{.*}}_