From 83adbdf2fa3f8a6cf70b0fc1288b9dea6c365d36 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Fri, 3 May 2024 07:32:42 -0700 Subject: [PATCH] [CI] Fix missing deps in dev igc installation (#13610) All opencl tests with current dev igc installtation are failing. Investigation shows that we are missing libopencl-clang. Unfortunately dev igc deb package did not include libopencl-clang, and Ubuntu did not have the correct version either, apt has up to libopencl-clang13, while we need libopenc-clang14. So the workaround is to backup the version installed by released igc version, then install it back after installing dev igc. This also seperate the installation of dev igc to new step, so that we can always do checksum and remove force dependency option to dpkg. --- .github/workflows/sycl-linux-precommit.yml | 4 +- devops/dependencies-igc-dev.json | 8 ++-- devops/scripts/install_drivers.sh | 46 ++++++++++++++-------- sycl/test-e2e/ESIMD/hardware_dispatch.cpp | 3 +- 4 files changed, 39 insertions(+), 22 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 40be7df928c1e..c17c49b25b45e 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -60,7 +60,9 @@ jobs: - name: Determine Arc tests id: arc_tests run: | - if [ "${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}" == "true" ]; then + if [ "${{ contains(needs.detect_changes.outputs.filters, 'devigccfg') }}" == "true" ]; then + echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT" + elif [ "${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}" == "true" ]; then echo 'arc_tests=""' >> "$GITHUB_OUTPUT" elif [ "${{ contains(needs.detect_changes.outputs.filters, 'esimd') }}" == "true" ]; then echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT" diff --git a/devops/dependencies-igc-dev.json b/devops/dependencies-igc-dev.json index e2d2d07e21dbc..d49b3bedfa16a 100644 --- a/devops/dependencies-igc-dev.json +++ b/devops/dependencies-igc-dev.json @@ -1,10 +1,10 @@ { "linux": { "igc_dev": { - "github_tag": "igc-dev-498324a", - "version": "498324a", - "updated_at": "2024-04-17T13:44:27Z", - "url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1422168296/zip", + "github_tag": "igc-dev-41e87ac", + "version": "41e87ac", + "updated_at": "2024-05-02T11:47:42Z", + "url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1466894014/zip", "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" } } diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index 805ffe1fcfff0..81ec1f69c4115 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -108,25 +108,21 @@ InstallIGFX () { echo "Compute Runtime version $CR_TAG" echo "CM compiler version $CM_TAG" echo "Level Zero version $L0_TAG" - IS_IGC_DEV=$(CheckIGCdevTag $IGCTAG) - IGNORE_CHECKSUM=false - DPKG_OPTIONS="" - if [ "$IS_IGC_DEV" == "Yes" ]; then - echo "IGC dev git hash $IGC_DEV_VER" - get_pre_release_igfx $IGC_DEV_URL $IGC_DEV_VER - IGNORE_CHECKSUM=true - DPKG_OPTIONS=" --force-depends-version" - else - echo "IGC version $IGC_TAG" - get_release intel/intel-graphics-compiler $IGC_TAG \ - | grep ".*deb" \ - | wget -qi - - fi + echo "IGC version $IGC_TAG" + # Always install released igc version first to get rid of the dependency issue + # by installing the igc first, we will satisfy all the dpkg dependencies . + # When we install dev igc later, it will then be treated as downgrade (because dev igc come with lowest version 1.0). + # This can help us avoid using the risky force-depends-version option in dpkg command. + # + # Of course, this also installed the libopencl-clang so that we can copy and use later as a temporariy workaround. + get_release intel/intel-graphics-compiler $IGC_TAG \ + | grep ".*deb" \ + | wget -qi - get_release intel/compute-runtime $CR_TAG \ | grep -E ".*((deb)|(sum))" \ | wget -qi - # Perform the checksum conditionally and then get the release - ( [ "$IGNORE_CHECKSUM" ] || sha256sum -c *.sum ) && \ + sha256sum -c *.sum && \ get_release intel/cm-compiler $CM_TAG \ | grep ".*deb" \ | grep -v "u18" \ @@ -134,7 +130,25 @@ InstallIGFX () { get_release oneapi-src/level-zero $L0_TAG \ | grep ".*deb" \ | wget -qi - - dpkg -i $DPKG_OPTIONS *.deb && rm *.deb *.sum + dpkg -i *.deb && rm *.deb *.sum + IS_IGC_DEV=$(CheckIGCdevTag $IGCTAG) + if [ "$IS_IGC_DEV" == "Yes" ]; then + # Dev IGC deb package did not include libopencl-clang + # opencl-clang repo does not provide release deb package either. + # Backup and install it from release igc as a temporarily workaround + # while we working to resolve the issue. + echo "Backup libopencl-clang" + cp -d /usr/local/lib/libopencl-clang.so.14* . + echo "Download IGC dev git hash $IGC_DEV_VER" + get_pre_release_igfx $IGC_DEV_URL $IGC_DEV_VER + echo "Install IGC dev git hash $IGC_DEV_VER" + dpkg -i *.deb + echo "Install libopencl-clang" + # Workaround only, will download deb and install with dpkg once fixed. + cp -d libopencl-clang.so.14* /usr/local/lib/ + echo "Clean up" + rm *.deb libopencl-clang.so.14* + fi } InstallCPURT () { diff --git a/sycl/test-e2e/ESIMD/hardware_dispatch.cpp b/sycl/test-e2e/ESIMD/hardware_dispatch.cpp index 22c93d2f43628..ad4819b211506 100644 --- a/sycl/test-e2e/ESIMD/hardware_dispatch.cpp +++ b/sycl/test-e2e/ESIMD/hardware_dispatch.cpp @@ -5,7 +5,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_bdw %s -o %t.out +// Add "-options -vc-codegen" explicitly to workaround bug in dev igc package. +// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_bdw %s -Xs "-options -vc-codegen" -o %t.out // RUN: %t.out // TODO: remove XFAIL when the fix in GPU RT for Windows is updated on CI // machines