diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index d9220050ee995..8740afd235acd 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -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) @@ -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 @@ -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 @@ -64,19 +81,41 @@ 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" \ @@ -84,7 +123,7 @@ InstallIGFX () { 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 () { @@ -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")