Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Install igc dev in devigc docker image #13272

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/sycl-containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ jobs:
file: ubuntu2204_intel_drivers
tags: ubuntu2204_intel_drivers
build_args: "use_latest=false"
- name: Intel Drivers Ubuntu 22.04 Docker image with dev IGC
file: ubuntu2204_intel_drivers
tags: ubuntu2204_intel_drivers_devigc
build_args: |
"use_latest=false"
"use_igc_dev=true"
Comment on lines +48 to +53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #13307

- name: Intel Drivers (unstable) Ubuntu 22.04 Docker image
file: ubuntu2204_intel_drivers
tags: ubuntu2204_intel_drivers_unstable
Expand Down
7 changes: 6 additions & 1 deletion devops/containers/ubuntu2204_intel_drivers.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ FROM $base_image:$base_tag
ENV DEBIAN_FRONTEND=noninteractive

ARG use_latest=true
ARG use_igc_dev=false

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

COPY scripts/get_release.py /
COPY scripts/install_drivers.sh /
Expand All @@ -20,6 +22,9 @@ RUN --mount=type=secret,id=github_token \
install_driver_opt=" --use-latest"; \
else \
install_driver_opt=" dependencies.json"; \
if [ "$use_igc_dev" = "true" ]; then \
install_driver_opt="$install_driver_opt --use-dev-igc"; \
fi; \
fi && \
GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all

Expand Down
8 changes: 4 additions & 4 deletions devops/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"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",
"github_tag": "igc-dev-3af2d9c",
"version": "3af2d9c",
"updated_at": "2024-04-04T12:27:26Z",
"url": "https://api.github.com/repos/intel/intel-graphics-compiler/actions/artifacts/1383563495/zip",
"root": "{DEPS_ROOT}/opencl/runtime/linux/oclgpu"
},
"cm": {
Expand Down
59 changes: 53 additions & 6 deletions devops/scripts/install_drivers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if [ -f "$1" ]; then
CONFIG_FILE=$1
CR_TAG=$(jq -r '.linux.compute_runtime.github_tag' $CONFIG_FILE)
IGC_TAG=$(jq -r '.linux.igc.github_tag' $CONFIG_FILE)
IGC_DEV_TAG=$(jq -r '.linux.igc_dev.github_tag' $CONFIG_FILE)
IGC_DEV_VER=$(jq -r '.linux.igc_dev.version' $CONFIG_FILE)
IGC_DEV_URL=$(jq -r '.linux.igc_dev.url' $CONFIG_FILE)
CM_TAG=$(jq -r '.linux.cm.github_tag' $CONFIG_FILE)
L0_TAG=$(jq -r '.linux.level_zero.github_tag' $CONFIG_FILE)
TBB_TAG=$(jq -r '.linux.tbb.github_tag' $CONFIG_FILE)
Expand All @@ -24,6 +27,9 @@ elif [[ "$*" == *"--use-latest"* ]]; then
else
CR_TAG=$compute_runtime_tag
IGC_TAG=$igc_tag
IGC_DEV_TAG=$igc_dev_tag
IGC_DEV_VER=$igc_dev_ver
IGC_DEV_URL=$igc_dev_url
CM_TAG=$cm_tag
L0_TAG=$level_zero_tag
TBB_TAG=$tbb_tag
Expand All @@ -47,6 +53,17 @@ function get_release() {
| jq -r '. as $raw | try .assets[].browser_download_url catch error($raw)'
}

function get_pre_release_igfx() {
URL=$1
HASH=$2
HEADER=""
if [ "$GITHUB_TOKEN" != "" ]; then
HEADER="Authorization: Bearer $GITHUB_TOKEN"
fi
curl -L -H "$HEADER" -H "Accept: application/vnd.github.v3+json" $URL -o $HASH.zip
unzip $HASH.zip && rm $HASH.zip
}

TBB_INSTALLED=false

if [[ -v INSTALL_LOCATION ]]; then
Expand All @@ -72,27 +89,49 @@ InstallTBB () {
fi
}

CheckIGCdevTag() {
local prefix="igc-dev-"
local arg="$1"

if [[ $arg == "$prefix"* ]]; then
echo "Yes"
else
echo "No"
fi
}

InstallIGFX () {
echo "Installing Intel Graphics driver..."
echo "Compute Runtime version $CR_TAG"
echo "IGC version $IGC_TAG"
echo "CM compiler version $CM_TAG"
echo "Level Zero version $L0_TAG"
get_release intel/intel-graphics-compiler $IGC_TAG \
| grep ".*deb" \
| wget -qi -
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
get_release intel/compute-runtime $CR_TAG \
| grep -E ".*((deb)|(sum))" \
| wget -qi -
sha256sum -c *.sum && \
# Perform the checksum conditionally and then get the release
( [ "$IGNORE_CHECKSUM" ] || sha256sum -c *.sum ) && \
get_release intel/cm-compiler $CM_TAG \
| grep ".*deb" \
| grep -v "u18" \
| wget -qi -
get_release oneapi-src/level-zero $L0_TAG \
| grep ".*deb" \
| wget -qi -
dpkg -i *.deb && rm *.deb *.sum
dpkg -i $DPKG_OPTIONS *.deb && rm *.deb *.sum
}

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

if [[ "$*" == *"--use-dev-igc"* ]]
then
IGCTAG=${IGC_DEV_TAG}
else
IGCTAG=${IGC_TAG}
fi

while [ "${1:-}" != "" ]; do
case "$1" in
"--all")
Expand Down
Loading