Skip to content

Commit

Permalink
Refactor code for igc-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
uditagarwal97 committed Sep 16, 2024
1 parent 27fff01 commit e42449e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,13 @@ jobs:
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
reset_intel_gpu: true
install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
extra_lit_opts: --param gpu-intel-gen12=True
- name: E2E tests on Intel Arc A-Series Graphics
runner: '["Linux", "arc"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu
reset_intel_gpu: true
install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
- name: E2E tests with dev igc on Intel Arc A-Series Graphics
Expand All @@ -103,14 +101,9 @@ jobs:
image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu
reset_intel_gpu: true
install_drivers: >-
${{ contains(needs.detect_changes.outputs.filters, 'drivers') ||
contains(needs.detect_changes.outputs.filters, 'devigccfg') }}
use_dev_igc: ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }}
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
# Run only if the PR does not have the 'ci-no-devigc' label.
skip_run: ${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') }}
use_igc_dev: True

uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
Expand All @@ -120,11 +113,13 @@ jobs:
image_options: ${{ matrix.image_options }}
target_devices: ${{ matrix.target_devices }}
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
install_drivers: ${{ matrix.install_drivers }}
use_dev_igc: ${{ matrix.use_dev_igc }}
extra_lit_opts: ${{ matrix.extra_lit_opts }}
env: ${{ matrix.env || '{}' }}
skip_run: ${{ matrix.skip_run || 'false' }}

install_igc_driver: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
install_dev_igc_driver: ${{matrix.use_igc_dev || 'false'}} && ${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }}
# Run only if the PR does not have the 'ci-no-devigc' label.
skip_run: ${{matrix.use_igc_dev || 'false'}} && ${{ contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') }}

ref: ${{ github.sha }}
merge_ref: ''
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ on:
reset_intel_gpu:
type: string
required: False
install_drivers:
install_igc_driver:
type: string
required: False
use_dev_igc:
install_dev_igc_driver:
type: string
required: False
env:
Expand Down Expand Up @@ -134,13 +134,13 @@ on:
Extra options to be added to LIT_OPTS.
default: ''

install_drivers:
install_igc_driver:
type: choice
options:
- false
- true

use_dev_igc:
install_dev_igc_driver:
type: choice
options:
- false
Expand Down Expand Up @@ -193,15 +193,15 @@ jobs:
run: |
git -C khronos_sycl_cts submodule update --init
- name: Install drivers
if: inputs.install_drivers == 'true'
if: inputs.install_igc_driver == 'true' || inputs.install_dev_igc_driver == 'true'
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
if [ "${{ inputs.use_dev_igc }}" = "true" ]; then
if [ "${{ inputs.install_dev_igc_driver }}" = "true" ]; then
# If libllvm14 is already installed (dev igc docker), still return true.
sudo apt-get install -yqq libllvm14 || true;
fi
sudo -E bash devops/scripts/install_drivers.sh llvm/devops/dependencies.json ${{ inputs.use_dev_igc == 'true' && 'llvm/devops/dependencies-igc-dev.json --use-dev-igc' || '' }} --all
sudo -E bash devops/scripts/install_drivers.sh llvm/devops/dependencies.json ${{ inputs.install_dev_igc_driver == 'true' && 'llvm/devops/dependencies-igc-dev.json --use-dev-igc' || '' }} --all
- name: Source OneAPI TBB vars.sh
shell: bash
run: |
Expand Down

0 comments on commit e42449e

Please sign in to comment.