Skip to content

Commit 2d0fff1

Browse files
Use latest sycl bundle to build DPCTL
The intel/llvm/pull/10551 has been merged, so the build should succeed and produce working binary. The intel/llvm project has transitioned from sycl-nightly/YYYYMMDD tags to nightly-YYYY-MM-DD tags instead. The artifact of intel/llvm nightly build has also changed the name and the structure. Adjusting the code for that.
1 parent 50f1074 commit 2d0fff1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/os-llvm-sycl-build.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@ jobs:
3838
3939
- name: Download and install nightly and components
4040
env:
41-
USE_LATEST_SYCLOS: 0
41+
ARTIFACT_NAME: sycl_linux
42+
USE_LATEST_SYCLOS: 1
4243
shell: bash -l {0}
4344
run: |
4445
cd /home/runner/work
4546
mkdir -p sycl_bundle
4647
cd sycl_bundle
4748
if [[ "${USE_LATEST_SYCLOS:-0}" -eq "1" ]]; then
48-
# get list of shas and tags from remote, filter sycl-nightly tags and reverse order
49+
# get list of shas and tags from remote, filter nightly tags and reverse order
4950
export LLVM_TAGS=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | \
50-
grep sycl-nightly | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }')
51+
grep 'refs/tags/nightly-' | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }')
5152
# initialize
5253
unset DEPLOY_NIGHTLY_TAG
5354
unset DEPLOY_NIGHTLY_TAG_SHA
@@ -57,7 +58,7 @@ jobs:
5758
export NEXT_LLVM_TAG_SHA=$(echo ${NEXT_LLVM_TAG} | awk '{print $1}')
5859
export NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
5960
$(echo ${NEXT_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
60-
if [[ `wget -S --spider ${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/dpcpp-compiler.tar.gz 2>&1 | grep 'HTTP/1.1 200 OK'` ]];
61+
if [[ `wget -S --spider ${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/${ARTIFACT_NAME}.tar.gz 2>&1 | grep 'HTTP/1.1 200 OK'` ]];
6162
then
6263
export DEPLOY_NIGHTLY_TAG=${NEXT_NIGHTLY_TAG}
6364
export DEPLOY_LLVM_TAG_SHA=${NEXT_LLVM_TAG_SHA}
@@ -77,21 +78,22 @@ jobs:
7778
if [[ -f bundle_id.txt && ( "$(cat bundle_id.txt)" == "${DEPLOY_LLVM_TAG_SHA}" ) ]]; then
7879
echo "Using cached download of ${DEPLOY_LLVM_TAG_SHA}"
7980
else
80-
rm -rf dpcpp-compiler.tar.gz
81-
wget ${DOWNLOAD_URL_PREFIX}/${DEPLOY_NIGHTLY_TAG}/dpcpp-compiler.tar.gz && echo ${DEPLOY_LLVM_TAG_SHA} > bundle_id.txt || rm -rf bundle_id.txt
81+
rm -rf ${ARTIFACT_NAME}.tar.gz
82+
wget ${DOWNLOAD_URL_PREFIX}/${DEPLOY_NIGHTLY_TAG}/${ARTIFACT_NAME}.tar.gz && echo ${DEPLOY_LLVM_TAG_SHA} > bundle_id.txt || rm -rf bundle_id.txt
8283
[ -f ${OCLCPUEXP_FN} ] || wget ${DOWNLOAD_URL_PREFIX}/${DRIVER_PATH}/${OCLCPUEXP_FN} || rm -rf bundle_id.txt
8384
[ -f ${FPGAEMU_FN} ] || wget ${DOWNLOAD_URL_PREFIX}/${DRIVER_PATH}/${FPGAEMU_FN} || rm -rf bundle_id.txt
8485
[ -f ${TBB_FN} ] || wget ${TBB_URL}/${TBB_FN} || rm -rf bundle_id.txt
8586
rm -rf dpcpp_compiler
86-
tar xf dpcpp-compiler.tar.gz
87+
mkdir -p dpcpp_compiler
88+
tar xf ${ARTIFACT_NAME}.tar.gz -C dpcpp_compiler
8789
mkdir -p oclcpuexp
8890
mkdir -p fpgaemu
8991
[ -d oclcpuexp/x64 ] || tar xf ${OCLCPUEXP_FN} -C oclcpuexp
9092
[ -d fpgaemu/x64 ] || tar xf ${FPGAEMU_FN} -C fpgaemu
9193
[ -d ${TBB_INSTALL_DIR}/lib ] || tar xf ${TBB_FN}
9294
mkdir -p dpcpp_compiler/lib
9395
mkdir -p dpcpp_compiler/lib/oclfpga
94-
touch dpcpp_compiler/lib/oclfpga/fpgavars.sh
96+
touch dpctpp/lib/oclfpga/fpgavars.sh
9597
fi
9698
9799
- name: Install system components
@@ -121,7 +123,8 @@ jobs:
121123
cat << 'EOF' > set_allvars.sh
122124
#!/usr/bin/bash
123125
export SYCL_BUNDLE_FOLDER=/home/runner/work/sycl_bundle
124-
source ${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/startup.sh
126+
export PATH=${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin:${PATH}
127+
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/lib:${LD_LIBRARY_PATH}
125128
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/oclcpuexp/x64:${LD_LIBRARY_PATH}
126129
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/fpgaemu/x64:${LD_LIBRARY_PATH}
127130
export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR}/lib/intel64/gcc4.8:${LD_LIBRARY_PATH}

0 commit comments

Comments
 (0)