Skip to content

Pin SYCLOS_Nightly version used #1280

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

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Intel OneAPI
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
run: |
sudo apt-get install intel-oneapi-dpcpp-cpp-compiler
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
- name: Install Lua
if: ${{ !github.event.pull_request || github.event.action != 'closed' }}
run: |
Expand Down
48 changes: 28 additions & 20 deletions .github/workflows/os-llvm-sycl-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,42 @@ jobs:
${{ runner.os }}-

- name: Download and install nightly and components
env:
USE_LATEST_SYCLOS: 0
shell: bash -l {0}
run: |
cd /home/runner/work
mkdir -p sycl_bundle
cd sycl_bundle
# get list of shas and tags from remote, filter sycl-nightly tags and reverse order
export LLVM_TAGS=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | \
grep sycl-nightly | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }')
# initialize
unset DEPLOY_NIGHTLY_TAG
unset DEPLOY_NIGHTLY_TAG_SHA

# go through tags and find the most recent one where nighly build binary is available
while IFS= read -r NEXT_LLVM_TAG; do
export NEXT_LLVM_TAG_SHA=$(echo ${NEXT_LLVM_TAG} | awk '{print $1}')
export NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
$(echo ${NEXT_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
if [[ `wget -S --spider ${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/dpcpp-compiler.tar.gz 2>&1 | grep 'HTTP/1.1 200 OK'` ]];
then
export DEPLOY_NIGHTLY_TAG=${NEXT_NIGHTLY_TAG}
export DEPLOY_LLVM_TAG_SHA=${NEXT_LLVM_TAG_SHA}
break
fi
done <<< "${LLVM_TAGS}"
if [[ "${USE_LATEST_SYCLOS:-0}" -eq "1" ]]; then
# get list of shas and tags from remote, filter sycl-nightly tags and reverse order
export LLVM_TAGS=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | \
grep sycl-nightly | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }')
# initialize
unset DEPLOY_NIGHTLY_TAG
unset DEPLOY_NIGHTLY_TAG_SHA

# go through tags and find the most recent one where nighly build binary is available
while IFS= read -r NEXT_LLVM_TAG; do
export NEXT_LLVM_TAG_SHA=$(echo ${NEXT_LLVM_TAG} | awk '{print $1}')
export NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.argv[1]))" \
$(echo ${NEXT_LLVM_TAG} | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}'))
if [[ `wget -S --spider ${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/dpcpp-compiler.tar.gz 2>&1 | grep 'HTTP/1.1 200 OK'` ]];
then
export DEPLOY_NIGHTLY_TAG=${NEXT_NIGHTLY_TAG}
export DEPLOY_LLVM_TAG_SHA=${NEXT_LLVM_TAG_SHA}
break
fi
done <<< "${LLVM_TAGS}"
else
# Use latest known to work tag instead
export DEPLOY_NIGHTLY_TAG="sycl-nightly%2F20230606"
export DEPLOY_LLVM_TAG_SHA=f44d0133d4b0077298f034697a1f3818ff1d6134
fi

[[ -n "${DEPLOY_NIGHTLY_TAG}" ]] || exit 1
[[ -n "${DEPLOY_LLVM_TAG_SHA}" ]] || exit 1
echo "Using ${m} corresponding to intel/llvm at ${DEPLOY_LLVM_TAG_SHA}"
echo "Using ${DEPLOY_NIGHTLY_TAG} corresponding to intel/llvm at ${DEPLOY_LLVM_TAG_SHA}"

if [[ -f bundle_id.txt && ( "$(cat bundle_id.txt)" == "${DEPLOY_LLVM_TAG_SHA}" ) ]]; then
echo "Using cached download of ${DEPLOY_LLVM_TAG_SHA}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ struct SequentialBooleanReduction
// must convert to boolean first to handle nans
using dpctl::tensor::type_utils::convert_impl;
outT val = convert_impl<bool, argT>(inp_[inp_offset]);
ReductionOp op = reduction_op_;

red_val = reduction_op_(red_val, val);
red_val = op(red_val, val);
}

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

local_red_val =
reduction_op_(local_red_val, static_cast<outT>(val));
local_red_val = op(local_red_val, static_cast<outT>(val));
}
}
// reduction and atomic operations are performed
Expand Down