Skip to content

[CI] Add flag to install igc dev driver #13260

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

Closed
wants to merge 1 commit into from
Closed
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
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 @@ -16,6 +19,9 @@ if [ -f "$1" ]; 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 @@ -39,6 +45,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 -s -L -H "$HEADER" $URL > $HASH.zip
unzip $HASH.zip && rm $HASH.zip
}

TBB_INSTALLED=false

if [[ -v INSTALL_LOCATION ]]; then
Expand All @@ -64,27 +81,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 @@ -131,12 +170,20 @@ 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 "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