Skip to content

Commit f032154

Browse files
Merge pull request #1280 from IntelPython/pin-syclos-version
Pin SYCLOS_Nightly version used
2 parents 79f4041 + 1057fd4 commit f032154

File tree

3 files changed

+33
-24
lines changed

3 files changed

+33
-24
lines changed

.github/workflows/generate-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Intel OneAPI
2727
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
2828
run: |
29-
sudo apt-get install intel-oneapi-dpcpp-cpp-compiler
29+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
3030
- name: Install Lua
3131
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
3232
run: |

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

+28-20
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,42 @@ jobs:
3737
${{ runner.os }}-
3838
3939
- name: Download and install nightly and components
40+
env:
41+
USE_LATEST_SYCLOS: 0
4042
shell: bash -l {0}
4143
run: |
4244
cd /home/runner/work
4345
mkdir -p sycl_bundle
4446
cd sycl_bundle
45-
# get list of shas and tags from remote, filter sycl-nightly tags and reverse order
46-
export LLVM_TAGS=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | \
47-
grep sycl-nightly | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }')
48-
# initialize
49-
unset DEPLOY_NIGHTLY_TAG
50-
unset DEPLOY_NIGHTLY_TAG_SHA
51-
52-
# go through tags and find the most recent one where nighly build binary is available
53-
while IFS= read -r NEXT_LLVM_TAG; do
54-
export NEXT_LLVM_TAG_SHA=$(echo ${NEXT_LLVM_TAG} | awk '{print $1}')
55-
export NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
56-
$(echo ${NEXT_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
57-
if [[ `wget -S --spider ${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/dpcpp-compiler.tar.gz 2>&1 | grep 'HTTP/1.1 200 OK'` ]];
58-
then
59-
export DEPLOY_NIGHTLY_TAG=${NEXT_NIGHTLY_TAG}
60-
export DEPLOY_LLVM_TAG_SHA=${NEXT_LLVM_TAG_SHA}
61-
break
62-
fi
63-
done <<< "${LLVM_TAGS}"
47+
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+
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+
# initialize
52+
unset DEPLOY_NIGHTLY_TAG
53+
unset DEPLOY_NIGHTLY_TAG_SHA
54+
55+
# go through tags and find the most recent one where nighly build binary is available
56+
while IFS= read -r NEXT_LLVM_TAG; do
57+
export NEXT_LLVM_TAG_SHA=$(echo ${NEXT_LLVM_TAG} | awk '{print $1}')
58+
export NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
59+
$(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+
then
62+
export DEPLOY_NIGHTLY_TAG=${NEXT_NIGHTLY_TAG}
63+
export DEPLOY_LLVM_TAG_SHA=${NEXT_LLVM_TAG_SHA}
64+
break
65+
fi
66+
done <<< "${LLVM_TAGS}"
67+
else
68+
# Use latest known to work tag instead
69+
export DEPLOY_NIGHTLY_TAG="sycl-nightly%2F20230606"
70+
export DEPLOY_LLVM_TAG_SHA=f44d0133d4b0077298f034697a1f3818ff1d6134
71+
fi
6472
6573
[[ -n "${DEPLOY_NIGHTLY_TAG}" ]] || exit 1
6674
[[ -n "${DEPLOY_LLVM_TAG_SHA}" ]] || exit 1
67-
echo "Using ${m} corresponding to intel/llvm at ${DEPLOY_LLVM_TAG_SHA}"
75+
echo "Using ${DEPLOY_NIGHTLY_TAG} corresponding to intel/llvm at ${DEPLOY_LLVM_TAG_SHA}"
6876
6977
if [[ -f bundle_id.txt && ( "$(cat bundle_id.txt)" == "${DEPLOY_LLVM_TAG_SHA}" ) ]]; then
7078
echo "Using cached download of ${DEPLOY_LLVM_TAG_SHA}"

dpctl/tensor/libtensor/include/kernels/boolean_reductions.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ struct SequentialBooleanReduction
198198
// must convert to boolean first to handle nans
199199
using dpctl::tensor::type_utils::convert_impl;
200200
outT val = convert_impl<bool, argT>(inp_[inp_offset]);
201+
ReductionOp op = reduction_op_;
201202

202-
red_val = reduction_op_(red_val, val);
203+
red_val = op(red_val, val);
203204
}
204205

205206
out_[out_iter_offset] = red_val;
@@ -452,9 +453,9 @@ struct StridedBooleanReduction
452453
// must convert to boolean first to handle nans
453454
using dpctl::tensor::type_utils::convert_impl;
454455
bool val = convert_impl<bool, argT>(inp_[inp_offset]);
456+
ReductionOp op = reduction_op_;
455457

456-
local_red_val =
457-
reduction_op_(local_red_val, static_cast<outT>(val));
458+
local_red_val = op(local_red_val, static_cast<outT>(val));
458459
}
459460
}
460461
// reduction and atomic operations are performed

0 commit comments

Comments
 (0)