From 7c310a9ea0c4a30f78c3fd4a63a01ac4e1396525 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Wed, 27 Mar 2024 22:57:28 +0100 Subject: [PATCH] [CI] Add IGC dev as new dependency This is the 1st PR in prepare of enabling dev IGC test for some of the t stSYCL tests. Ref: https://github.com/intel/llvm/pull/11552 --- .github/workflows/sycl-update-gpu-driver.yml | 1 + devops/dependencies.json | 7 +++++ devops/scripts/update_drivers.py | 27 ++++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/.github/workflows/sycl-update-gpu-driver.yml b/.github/workflows/sycl-update-gpu-driver.yml index 9dcb66b7d95bd..5a3865816013f 100644 --- a/.github/workflows/sycl-update-gpu-driver.yml +++ b/.github/workflows/sycl-update-gpu-driver.yml @@ -26,5 +26,6 @@ jobs: git checkout -B $BRANCH git add -u git commit -m "[GHA] Uplift Linux GPU RT version to $NEW_DRIVER_VERSION" || exit 0 # exit if commit is empty + git show git push https://$GITHUB_TOKEN@github.com/${{ github.repository }} ${BRANCH} gh pr create --head $BRANCH --title "[GHA] Uplift Linux GPU RT version to $NEW_DRIVER_VERSION" --body "Scheduled drivers uplift" diff --git a/devops/dependencies.json b/devops/dependencies.json index 84693e60db395..5297f823f9306 100644 --- a/devops/dependencies.json +++ b/devops/dependencies.json @@ -12,6 +12,13 @@ "url": "https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.15985.7", "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" }, + "igc_dev": { + "github_tag": "igc-dev-3d81e14", + "version": "3d81e14", + "updated_at": "2024-03-27T19:44:26Z", + "url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1364385215/zip", + "root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu" + }, "cm": { "github_tag": "cmclang-1.0.144", "version": "1.0.144", diff --git a/devops/scripts/update_drivers.py b/devops/scripts/update_drivers.py index 260069ffca8eb..cd042c4ca5b9b 100644 --- a/devops/scripts/update_drivers.py +++ b/devops/scripts/update_drivers.py @@ -10,6 +10,24 @@ def get_latest_release(repo): return json.loads(releases)[0] +def get_latest_workflow_runs(repo, workflow_name): + action_runs = urlopen( + "https://api.github.com/repos/" + + repo + + "/actions/workflows/" + + workflow_name + + ".yml/runs?status=success" + ).read() + return json.loads(action_runs)["workflow_runs"][0] + + +def get_artifacts_download_url(repo, name): + artifacts = urlopen( + "https://api.github.com/repos/" + repo + "/actions/artifacts?name=" + name + ).read() + return json.loads(artifacts)["artifacts"][0]["archive_download_url"] + + def uplift_linux_igfx_driver(config, platform_tag): compute_runtime = get_latest_release('intel/compute-runtime') @@ -28,6 +46,15 @@ def uplift_linux_igfx_driver(config, platform_tag): config[platform_tag]['igc']['url'] = 'https://github.com/intel/intel-graphics-compiler/releases/tag/igc-' + ver break + igc_dev = get_latest_workflow_runs("intel/intel-graphics-compiler", "build-IGC") + igcdevver = igc_dev["head_sha"][:7] + config[platform_tag]["igc_dev"]["github_tag"] = "igc-dev-" + igcdevver + config[platform_tag]["igc_dev"]["version"] = igcdevver + config[platform_tag]["igc_dev"]["updated_at"] = igc_dev["updated_at"] + config[platform_tag]["igc_dev"]["url"] = get_artifacts_download_url( + "intel/intel-graphics-compiler", "IGC_Ubuntu22.04_llvm14_clang-" + igcdevver + ) + cm = get_latest_release('intel/cm-compiler') config[platform_tag]['cm']['github_tag'] = cm['tag_name'] config[platform_tag]['cm']['version'] = cm['tag_name'].replace('cmclang-', '')