Skip to content

Commit 9dd6baf

Browse files
committed
Merge branch 'keep-non-patch-200' into add-clang-bf16-patches-200
2 parents 4ce934f + b866d74 commit 9dd6baf

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/workflows/on-push-verification-in-tree.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,30 @@ jobs:
3535
- name: Checkout opencl-clang sources for action files
3636
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
3737

38+
# This step will fail when the branch naming scheme 'ocl-open-XXX' changes!
39+
- name: Parse LLVM version from branch name
40+
id: check-llvm-version
41+
run: |
42+
BRANCH="${{ github.base_ref }}" # on: pull_request, otherwise null
43+
BRANCH=${BRANCH:-${{ github.ref_name }}} # on: push
44+
# Extract the padded LLVM version (e.g., 200 for LLVM 20)
45+
LLVM_VERSION_PADDED=$(echo "$BRANCH" | sed -n 's/^ocl-open-\([0-9]\+\)$/\1/p')
46+
if [ -z "$LLVM_VERSION_PADDED" ]; then
47+
echo "[OPENCL-CLANG] Error: Could not parse LLVM version from branch name '$BRANCH'"
48+
exit 1
49+
fi
50+
# Extract the actual LLVM version (e.g., 20 from 200)
51+
if [[ "$LLVM_VERSION_PADDED" =~ ^([0-9]+)0$ ]]; then
52+
LLVM_VERSION_SHORT="${BASH_REMATCH[1]}"
53+
else
54+
echo "[OPENCL-CLANG] Error: Unexpected LLVM version format '$LLVM_VERSION_PADDED' from branch name '$BRANCH'"
55+
exit 1
56+
fi
57+
echo "llvm_version=$LLVM_VERSION_SHORT" >> $GITHUB_OUTPUT
58+
3859
- name: Run build-opencl-clang action
3960
uses: ./.github/actions/build-opencl-clang
4061
with:
41-
ref_llvm: main
42-
ref_translator: main
62+
ref_llvm: release/${{ steps.check-llvm-version.outputs.llvm_version }}.x
63+
ref_translator: llvm_release_${{ steps.check-llvm-version.outputs.llvm_version }}0
4364
ref_opencl-clang: ${{ github.ref }}

cmake/modules/CMakeFunctions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function(apply_patches repo_dir patches_dir base_revision target_branch)
134134
message(STATUS "[OPENCL-CLANG] Patch ${patch} is already in local branch - ignore patching")
135135
else()
136136
execute_process( # Apply the patch
137-
COMMAND ${GIT_EXECUTABLE} am --3way --ignore-whitespace ${patch}
137+
COMMAND ${GIT_EXECUTABLE} am --3way --keep-non-patch --ignore-whitespace ${patch}
138138
WORKING_DIRECTORY ${repo_dir}
139139
OUTPUT_VARIABLE patching_log
140140
)

0 commit comments

Comments
 (0)