@@ -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
2427else
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+
5067TBB_INSTALLED=false
5168
5269if [[ -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+
75103InstallIGFX () {
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
98137InstallCPURT () {
@@ -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
147187fi
148188
189+ if [[ " $* " == * " --use-dev-igc" * ]]
190+ then
191+ IGCTAG=${IGC_DEV_TAG}
192+ else
193+ IGCTAG=${IGC_TAG}
194+ fi
195+
149196while [ " ${1:- } " != " " ]; do
150197 case " $1 " in
151198 " --all" )
0 commit comments