Skip to content

Commit 5b35190

Browse files
[CI] Run build on Ubuntu 22, pre-commit if CUDA adapter changes. (#17757)
Our Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.04 image has CUDA 12.6.1 installed. If a PR changes CUDA adapter, we should test the change with both CUDA versions.
1 parent 7369251 commit 5b35190

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/sycl-detect-changes.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ jobs:
8282
ur:
8383
- 'unified-runtime/**'
8484
- .github/workflows/ur-*
85+
ur_cuda_adapter:
86+
- 'unified-runtime/source/adapters/cuda/**'
8587
8688
- name: Set output
8789
id: result
@@ -92,7 +94,7 @@ jobs:
9294
return '${{ steps.changes.outputs.changes }}';
9395
}
9496
// Treat everything as changed for huge PRs.
95-
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "esimd", "ur"];
97+
return ["llvm", "llvm_spirv", "clang", "sycl_jit", "xptifw", "libclc", "sycl", "ci", "esimd", "ur", "ur_cuda_adapter"];
9698
9799
- run: echo '${{ steps.result.outputs.result }}'
98100

.github/workflows/sycl-linux-precommit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ jobs:
5353
changes: ${{ needs.detect_changes.outputs.filters }}
5454
e2e_binaries_artifact: sycl_e2e_bin_default
5555

56+
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well.
57+
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image
58+
# has CUDA 12.6.1 installed.
59+
# The idea is to ensure that the code works with both CUDA versions.
60+
build_ubuntu2204:
61+
needs: [detect_changes]
62+
if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter')
63+
uses: ./.github/workflows/sycl-linux-build.yml
64+
with:
65+
build_ref: ${{ github.sha }}
66+
build_cache_root: "/__w/"
67+
build_artifact_suffix: "default"
68+
build_cache_suffix: "default"
69+
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"
70+
changes: ${{ needs.detect_changes.outputs.filters }}
71+
5672
run_prebuilt_e2e_tests:
5773
needs: [build, detect_changes]
5874
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}

0 commit comments

Comments
 (0)