From e42449edb0d3c44bd42e9b25c9852883a390fcee Mon Sep 17 00:00:00 2001 From: "Agarwal, Udit" Date: Mon, 16 Sep 2024 12:58:25 -0700 Subject: [PATCH] Refactor code for igc-dev --- .github/workflows/sycl-linux-precommit.yml | 17 ++++++----------- .github/workflows/sycl-linux-run-tests.yml | 14 +++++++------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 460e1737b194a..d6dbfdd5e536f 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -86,7 +86,6 @@ 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"]' @@ -94,7 +93,6 @@ 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') }} 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 @@ -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: @@ -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: '' diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index 077f7f8aac726..16c419c7126f6 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -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: @@ -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 @@ -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: |