Skip to content

Commit fd2aca0

Browse files
authored
[CI] Install igc dev in devigc docker image (#13272)
- Add flag in install_driver to install igc dev driver - Add options to build devigc containers Ref: #11552
1 parent 902dadc commit fd2aca0

File tree

4 files changed

+69
-11
lines changed

4 files changed

+69
-11
lines changed

.github/workflows/sycl-containers.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
file: ubuntu2204_intel_drivers
4646
tags: ubuntu2204_intel_drivers
4747
build_args: "use_latest=false"
48+
- name: Intel Drivers Ubuntu 22.04 Docker image with dev IGC
49+
file: ubuntu2204_intel_drivers
50+
tags: ubuntu2204_intel_drivers_devigc
51+
build_args: |
52+
"use_latest=false"
53+
"use_igc_dev=true"
4854
- name: Intel Drivers (unstable) Ubuntu 22.04 Docker image
4955
file: ubuntu2204_intel_drivers
5056
tags: ubuntu2204_intel_drivers_unstable

devops/containers/ubuntu2204_intel_drivers.Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ FROM $base_image:$base_tag
66
ENV DEBIAN_FRONTEND=noninteractive
77

88
ARG use_latest=true
9+
ARG use_igc_dev=false
910

10-
RUN apt update && apt install -yqq wget
11+
RUN apt update && apt install -yqq wget \
12+
&& if [ "$use_igc_dev" = "true" ]; then apt-get install -yqq libllvm14; fi
1113

1214
COPY scripts/get_release.py /
1315
COPY scripts/install_drivers.sh /
@@ -20,6 +22,9 @@ RUN --mount=type=secret,id=github_token \
2022
install_driver_opt=" --use-latest"; \
2123
else \
2224
install_driver_opt=" dependencies.json"; \
25+
if [ "$use_igc_dev" = "true" ]; then \
26+
install_driver_opt="$install_driver_opt --use-dev-igc"; \
27+
fi; \
2328
fi && \
2429
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all
2530

devops/dependencies.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
1414
},
1515
"igc_dev": {
16-
"github_tag": "igc-dev-3d81e14",
17-
"version": "3d81e14",
18-
"updated_at": "2024-03-27T19:44:26Z",
19-
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1364385215/zip",
16+
"github_tag": "igc-dev-3af2d9c",
17+
"version": "3af2d9c",
18+
"updated_at": "2024-04-04T12:27:26Z",
19+
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1383563495/zip",
2020
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
2121
},
2222
"cm": {

devops/scripts/install_drivers.sh

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if [ -f "$1" ]; then
88
CONFIG_FILE=$1
99
CR_TAG=$(jq -r '.linux.compute_runtime.github_tag' $CONFIG_FILE)
1010
IGC_TAG=$(jq -r '.linux.igc.github_tag' $CONFIG_FILE)
11+
IGC_DEV_TAG=$(jq -r '.linux.igc_dev.github_tag' $CONFIG_FILE)
12+
IGC_DEV_VER=$(jq -r '.linux.igc_dev.version' $CONFIG_FILE)
13+
IGC_DEV_URL=$(jq -r '.linux.igc_dev.url' $CONFIG_FILE)
1114
CM_TAG=$(jq -r '.linux.cm.github_tag' $CONFIG_FILE)
1215
L0_TAG=$(jq -r '.linux.level_zero.github_tag' $CONFIG_FILE)
1316
TBB_TAG=$(jq -r '.linux.tbb.github_tag' $CONFIG_FILE)
@@ -24,6 +27,9 @@ elif [[ "$*" == *"--use-latest"* ]]; then
2427
else
2528
CR_TAG=$compute_runtime_tag
2629
IGC_TAG=$igc_tag
30+
IGC_DEV_TAG=$igc_dev_tag
31+
IGC_DEV_VER=$igc_dev_ver
32+
IGC_DEV_URL=$igc_dev_url
2733
CM_TAG=$cm_tag
2834
L0_TAG=$level_zero_tag
2935
TBB_TAG=$tbb_tag
@@ -47,6 +53,17 @@ function get_release() {
4753
| jq -r '. as $raw | try .assets[].browser_download_url catch error($raw)'
4854
}
4955

56+
function get_pre_release_igfx() {
57+
URL=$1
58+
HASH=$2
59+
HEADER=""
60+
if [ "$GITHUB_TOKEN" != "" ]; then
61+
HEADER="Authorization: Bearer $GITHUB_TOKEN"
62+
fi
63+
curl -L -H "$HEADER" -H "Accept: application/vnd.github.v3+json" $URL -o $HASH.zip
64+
unzip $HASH.zip && rm $HASH.zip
65+
}
66+
5067
TBB_INSTALLED=false
5168

5269
if [[ -v INSTALL_LOCATION ]]; then
@@ -72,27 +89,49 @@ InstallTBB () {
7289
fi
7390
}
7491

92+
CheckIGCdevTag() {
93+
local prefix="igc-dev-"
94+
local arg="$1"
95+
96+
if [[ $arg == "$prefix"* ]]; then
97+
echo "Yes"
98+
else
99+
echo "No"
100+
fi
101+
}
102+
75103
InstallIGFX () {
76104
echo "Installing Intel Graphics driver..."
77105
echo "Compute Runtime version $CR_TAG"
78-
echo "IGC version $IGC_TAG"
79106
echo "CM compiler version $CM_TAG"
80107
echo "Level Zero version $L0_TAG"
81-
get_release intel/intel-graphics-compiler $IGC_TAG \
82-
| grep ".*deb" \
83-
| wget -qi -
108+
IS_IGC_DEV=$(CheckIGCdevTag $IGCTAG)
109+
IGNORE_CHECKSUM=false
110+
DPKG_OPTIONS=""
111+
if [ "$IS_IGC_DEV" == "Yes" ]; then
112+
echo "IGC dev git hash $IGC_DEV_VER"
113+
get_pre_release_igfx $IGC_DEV_URL $IGC_DEV_VER
114+
IGNORE_CHECKSUM=true
115+
DPKG_OPTIONS=" --force-depends-version"
116+
else
117+
echo "IGC version $IGC_TAG"
118+
get_release intel/intel-graphics-compiler $IGC_TAG \
119+
| grep ".*deb" \
120+
| wget -qi -
121+
fi
84122
get_release intel/compute-runtime $CR_TAG \
85123
| grep -E ".*((deb)|(sum))" \
86124
| wget -qi -
87-
sha256sum -c *.sum && \
125+
# Perform the checksum conditionally and then get the release
126+
( [ "$IGNORE_CHECKSUM" ] || sha256sum -c *.sum ) && \
88127
get_release intel/cm-compiler $CM_TAG \
89128
| grep ".*deb" \
90129
| grep -v "u18" \
91130
| wget -qi -
92131
get_release oneapi-src/level-zero $L0_TAG \
93132
| grep ".*deb" \
94133
| wget -qi -
95-
dpkg -i *.deb && rm *.deb *.sum
134+
dpkg -i $DPKG_OPTIONS *.deb && rm *.deb *.sum
96135
}
97136

98137
InstallCPURT () {
@@ -139,13 +178,21 @@ if [[ $# -eq 0 ]] ; then
139178
echo "No options were specified. Please, specify one or more of the following:"
140179
echo "--all - Install all Intel drivers"
141180
echo "--igfx - Install Intel Graphics drivers"
181+
echo "--use-dev-igc - Install development version of Intel Graphics drivers instead"
142182
echo "--cpu - Install Intel CPU OpenCL runtime"
143183
echo "--fpga-emu - Install Intel FPGA Fast emulator"
144184
echo "--use-latest - Use latest for all tags"
145185
echo "Set INSTALL_LOCATION env variable to specify install location"
146186
exit 0
147187
fi
148188

189+
if [[ "$*" == *"--use-dev-igc"* ]]
190+
then
191+
IGCTAG=${IGC_DEV_TAG}
192+
else
193+
IGCTAG=${IGC_TAG}
194+
fi
195+
149196
while [ "${1:-}" != "" ]; do
150197
case "$1" in
151198
"--all")

0 commit comments

Comments
 (0)