Skip to content

Commit 448bbaa

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into update_group_interface
2 parents 973de72 + 5da31d4 commit 448bbaa

File tree

545 files changed

+19672
-4723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

545 files changed

+19672
-4723
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,7 @@ llvm/test/Instrumentation/ThreadSanitizer/ @intel/dpcpp-sanitizers-review
223223
sycl/test-e2e/AddressSanitizer/ @intel/dpcpp-sanitizers-review
224224
sycl/test-e2e/MemorySanitizer/ @intel/dpcpp-sanitizers-review
225225
sycl/test-e2e/ThreadSanitizer/ @intel/dpcpp-sanitizers-review
226+
227+
# ABI compatibility
228+
devops/compat_ci_exclude.sycl-rel-** @gmlueck @xtian-github
229+
sycl/test/abi/*sycl-rel*.dump @AlexeySachkov @KornevNikita
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow checks for ready-to-merge PRs - if a PR is open, not a draft,
2+
# passed all checks, and has been approved, it will ping @intel/llvm-gatekeepers
3+
# if this group has not already been mentioned or if the last mention was more
4+
# than $days days ago.
5+
6+
name: Check ready-to-merge PRs
7+
8+
on:
9+
schedule:
10+
- cron: '0 * * * *' # every hour
11+
workflow_dispatch:
12+
13+
permissions: read-all
14+
15+
jobs:
16+
notify-ready-prs:
17+
permissions:
18+
pull-requests: write
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
# Number of days before repeating the gatekeepers ping
26+
days=3
27+
days_in_seconds=$((days*24*60*60))
28+
29+
# Function to ping gatekeepers and print debug info
30+
ping_gatekeepers() {
31+
pr_number=$1
32+
gh pr comment "$pr_number" --repo intel/llvm --body "@intel/llvm-gatekeepers please consider merging"
33+
echo "Pinged @intel/llvm-gatekeepers for https://github.com/intel/llvm/pull/$pr_number"
34+
}
35+
36+
# Get the list of suitable PRs
37+
prs=$(gh pr list --search "is:open review:approved draft:no status:success" --repo intel/llvm --json number --jq '.[].number')
38+
now=$(date -u +%s)
39+
for pr in $prs; do
40+
# Get the timestamp of the latest comment mentioning @intel/llvm-gatekeepers
41+
latest_ts=$(gh pr view $pr --repo intel/llvm --json comments \
42+
--jq '[.comments[] | select(.body | test("@intel/llvm-gatekeepers")) | .createdAt] | last')
43+
# If there is no previous mention, ping the gatekeepers
44+
if [[ -z "$latest_ts" ]]; then
45+
ping_gatekeepers "$pr"
46+
# If the latest mention is older than $days, ping the gatekeepers again
47+
else
48+
comment_time=$(date -u -d "$latest_ts" +%s)
49+
age=$((now - comment_time))
50+
if (( age >= days_in_seconds )); then
51+
ping_gatekeepers "$pr"
52+
fi
53+
fi
54+
done

.github/workflows/sycl-linux-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ jobs:
296296
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
297297
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
298298
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
299+
# This is required to perform the DeviceConfigFile consistency test, see
300+
# sycl/test-e2e/Basic/device_config_file_consistency.cpp.
301+
cmake --install $GITHUB_WORKSPACE/build --component DeviceConfigFile
299302
- name: Additional Install for "--shared-libs" build
300303
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && contains(inputs.build_configure_extra_args, '--shared-libs') }}
301304
run: |

.github/workflows/sycl-linux-precommit.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ jobs:
8181

8282
compat_read_exclude:
8383
name: Read compatibility testing exclude list
84-
runs-on: [Linux, build]
84+
runs-on: [Linux, aux-tasks]
8585
outputs:
86-
FILTER: ${{ steps.result.outputs.FILTER }}
86+
FILTER_6_2: ${{ steps.result.outputs.FILTER_6_2 }}
87+
FILTER_6_3: ${{ steps.result.outputs.FILTER_6_3 }}
8788
steps:
8889
- uses: actions/checkout@v4
8990
with:
@@ -96,7 +97,8 @@ jobs:
9697
run: |
9798
# Transform to format expected by `llvm-lit --filter-out "pattern1|pattern2|..."`.
9899
# First, remove comments/empty lines, then join lines with "|" as separator.
99-
echo FILTER="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT
100+
echo FILTER_6_2="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT
101+
echo FILTER_6_3="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_3 | paste -sd '|')" >> $GITHUB_OUTPUT
100102
101103
run_prebuilt_e2e_tests:
102104
needs: [build, detect_changes, compat_read_exclude]
@@ -147,7 +149,13 @@ jobs:
147149
runner: '["Linux", "pvc"]'
148150
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2
149151
target_devices: level_zero:gpu
150-
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"'
152+
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_2 }}"'
153+
e2e_binaries_artifact: 'in-container'
154+
- name: ABI compatibility against sycl-rel-6_3
155+
runner: '["Linux", "pvc"]'
156+
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_3
157+
target_devices: level_zero:gpu
158+
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_3 }}"'
151159
e2e_binaries_artifact: 'in-container'
152160

153161
uses: ./.github/workflows/sycl-linux-run-tests.yml

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ on:
159159
options:
160160
- 'ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest'
161161
- 'ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2'
162+
- 'ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_3'
162163
- 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'
163164
image_options:
164165
description: |
@@ -357,6 +358,7 @@ jobs:
357358
save_name: ${{ inputs.benchmark_save_name }}
358359
preset: ${{ inputs.benchmark_preset }}
359360
dry_run: ${{ inputs.benchmark_dry_run }}
361+
build_ref: ${{ inputs.repo_ref }}
360362
env:
361363
RUNNER_TAG: ${{ inputs.runner }}
362364
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}

.github/workflows/sycl-nightly.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ on:
88
permissions: read-all
99

1010
jobs:
11+
check_abi_symbols:
12+
name: Check ABI symbols tests match release branch
13+
runs-on: [Linux, build]
14+
if: github.repository == 'intel/llvm'
15+
container: ghcr.io/intel/llvm/ubuntu2404_build
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
sparse-checkout: |
20+
sycl/test/abi
21+
- run: |
22+
git fetch --depth=1 origin sycl-rel-6_3
23+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_linux.dump sycl/test/abi/sycl_symbols_linux-sycl-rel-6_3.dump
24+
git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_windows.dump sycl/test/abi/sycl_symbols_windows-sycl-rel-6_3.dump
25+
1126
ubuntu2204_build:
1227
if: github.repository == 'intel/llvm'
1328
uses: ./.github/workflows/sycl-linux-build.yml

.github/workflows/sycl-ur-perf-benchmarking.yml

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,18 @@ on:
2828
deployment branch will be used.
2929
required: false
3030
default: ''
31+
save_name:
32+
type: string
33+
description: |
34+
Specify a custom name to use for the benchmark result: If uploading
35+
results, this will be the name used to refer results from the current
36+
run.
37+
required: false
38+
default: ''
3139
upload_results:
3240
type: string # true/false: workflow_dispatch does not support booleans
41+
description: |
42+
Upload results to https://intel.github.io/llvm/benchmarks/.
3343
required: true
3444
runner:
3545
type: string
@@ -67,8 +77,14 @@ on:
6777
Leave both pr_no and commit_hash empty to use latest commit.
6878
required: false
6979
default: ''
80+
save_name:
81+
type: string
82+
description: |
83+
Name to use for the benchmark result:
84+
required: false
85+
default: ''
7086
upload_results:
71-
description: 'Save and upload results'
87+
description: 'Save and upload results (to https://intel.github.io/llvm/benchmarks)'
7288
type: choice
7389
options:
7490
- false
@@ -90,16 +106,61 @@ on:
90106
permissions: read-all
91107

92108
jobs:
109+
sanitize_inputs:
110+
name: Sanitize inputs
111+
runs-on: ubuntu-latest
112+
env:
113+
COMMIT_HASH: ${{ inputs.commit_hash }}
114+
PR_NO: ${{ inputs.pr_no }}
115+
SAVE_NAME: ${{ inputs.save_name }}
116+
outputs:
117+
benchmark_save_name: ${{ steps.sanitize.outputs.benchmark_save_name }}
118+
build_ref: ${{ steps.sanitize.outputs.build_ref }}
119+
steps:
120+
- id: sanitize
121+
run: |
122+
# Validate user inputs:
123+
# usage: check_if_nonempty <var> <regex to check var against> <err message>
124+
check_nonempty() {
125+
[ -z "$1" ] && return
126+
if [ -z "$(echo "$1" | grep -P "$2")" ]; then
127+
echo "$3"
128+
exit 1
129+
fi
130+
}
131+
check_nonempty "$COMMIT_HASH" '^[0-9a-f]{7,}$' "Bad commit hash (or hash short)."
132+
check_nonempty "$PR_NO" '^[0-9]+$' "Bad PR number."
133+
check_nonempty "$SAVE_NAME" '^[A-Za-z][A-Za-z0-9_-]+$' "Bad save name."
134+
135+
BENCHMARK_SAVE_NAME=""
136+
BUILD_REF="${{ github.ref }}"
137+
if [ -n "$SAVE_NAME" ]; then
138+
BENCHMARK_SAVE_NAME="$(echo "$SAVE_NAME" | tr -cd 'A-Za-z0-9_-')"
139+
fi;
140+
if [ -n "$COMMIT_HASH" ]; then
141+
echo "Using commit hash $COMMIT_HASH for build..."
142+
BUILD_REF="$COMMIT_HASH"
143+
shortened_commit="$(echo "$COMMIT_HASH" | cut -c 1-7)"
144+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="Commit_${shortened_commit}"
145+
elif [ -n "$PR_NO" ]; then
146+
echo "Using PR no. $PR_NO for build..."
147+
BUILD_REF="refs/pull/$PR_NO/head"
148+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="PR_${PR_NO}"
149+
fi
150+
[ -z "$BENCHMARK_SAVE_NAME" ] && BENCHMARK_SAVE_NAME="Baseline"
151+
152+
echo "benchmark_save_name=$BENCHMARK_SAVE_NAME" >> $GITHUB_OUTPUT
153+
echo "build_ref=$BUILD_REF" >> $GITHUB_OUTPUT
154+
155+
echo "Final sanitized values:"
156+
cat $GITHUB_OUTPUT
157+
93158
build_sycl:
94159
name: Build SYCL
160+
needs: [ sanitize_inputs ]
95161
uses: ./.github/workflows/sycl-linux-build.yml
96162
with:
97-
build_ref: |
98-
${{
99-
inputs.commit_hash != '' && inputs.commit_hash ||
100-
inputs.pr_no != '' && format('refs/pull/{0}/head', inputs.pr_no) ||
101-
github.ref
102-
}}
163+
build_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
103164
build_cache_root: "/__w/"
104165
build_cache_suffix: "prod_noassert"
105166
build_configure_extra_args: "--no-assertions"
@@ -112,14 +173,12 @@ jobs:
112173

113174
run_benchmarks_build:
114175
name: Run Benchmarks on Build
115-
needs: [ build_sycl ]
176+
needs: [ build_sycl, sanitize_inputs ]
116177
strategy:
117178
matrix:
118179
include:
119-
- ref: ${{ inputs.commit_hash != '' && inputs.commit_hash || inputs.pr_no != '' && format('refs/pull/{0}/head', inputs.pr_no) || github.ref }}
120-
save_name: ${{ inputs.commit_hash != '' && format('Commit{0}', inputs.commit_hash) || inputs.pr_no != '' && format('PR{0}', inputs.pr_no) || 'Baseline' }}
121-
# Set default values if not specified:
122-
runner: ${{ inputs.runner || '["PVC_PERF"]' }}
180+
# Set default values if not specified:
181+
- runner: ${{ inputs.runner || '["PVC_PERF"]' }}
123182
backend: ${{ inputs.backend || 'level_zero:gpu' }}
124183
uses: ./.github/workflows/sycl-linux-run-tests.yml
125184
secrets: inherit
@@ -131,9 +190,9 @@ jobs:
131190
target_devices: ${{ matrix.backend }}
132191
tests_selector: benchmarks
133192
benchmark_upload_results: ${{ inputs.upload_results }}
134-
benchmark_save_name: ${{ matrix.save_name }}
193+
benchmark_save_name: ${{ needs.sanitize_inputs.outputs.benchmark_save_name }}
135194
benchmark_preset: ${{ inputs.preset }}
136-
repo_ref: ${{ matrix.ref }}
195+
repo_ref: ${{ needs.sanitize_inputs.outputs.build_ref }}
137196
toolchain_artifact: ${{ needs.build_sycl.outputs.toolchain_artifact }}
138197
toolchain_artifact_filename: ${{ needs.build_sycl.outputs.toolchain_artifact_filename }}
139198
toolchain_decompress_command: ${{ needs.build_sycl.outputs.toolchain_decompress_command }}

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ for general guidelines around contributing to this project. You can then see
7979
[ContributeToDPCPP](./sycl/doc/developer/ContributeToDPCPP.md) for DPC++ specific
8080
guidelines.
8181

82-
## Late-outline OpenMP\* and OpenMP\* Offload
83-
84-
See [openmp](/openmp) branch.
85-
8682
# License
8783

8884
See [LICENSE](./sycl/LICENSE.TXT) for details.

buildbot/configure.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ def do_configure(args, passthrough_args):
6666
xpti_enable_werror = "OFF"
6767
llvm_enable_zstd = "OFF"
6868
spirv_enable_dis = "OFF"
69-
sycl_install_device_config_file = "OFF"
7069

7170
if sys.platform != "darwin":
7271
# For more info on the enablement of level_zero_v2 refer to this document:
@@ -83,6 +82,11 @@ def do_configure(args, passthrough_args):
8382
if libclc_enabled:
8483
llvm_enable_projects += ";libclc"
8584

85+
# DeviceRTL uses -fuse-ld=lld, so enable lld.
86+
if args.offload:
87+
llvm_enable_projects += ";lld"
88+
sycl_enabled_backends.append("offload")
89+
8690
if args.cuda:
8791
llvm_targets_to_build += ";NVPTX"
8892
libclc_targets_to_build = libclc_nvidia_target_names
@@ -162,7 +166,6 @@ def do_configure(args, passthrough_args):
162166
libclc_targets_to_build += libclc_nvidia_target_names
163167
libclc_gen_remangled_variants = "ON"
164168
spirv_enable_dis = "ON"
165-
sycl_install_device_config_file = "ON"
166169

167170
if args.enable_backends:
168171
sycl_enabled_backends += args.enable_backends
@@ -211,8 +214,13 @@ def do_configure(args, passthrough_args):
211214
"-DSYCL_ENABLE_EXTENSION_JIT={}".format(sycl_enable_jit),
212215
"-DSYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB={}".format(sycl_preview_lib),
213216
"-DBUG_REPORT_URL=https://github.com/intel/llvm/issues",
214-
"-DSYCL_INSTALL_DEVICE_CONFIG_FILE={}".format(sycl_install_device_config_file),
215217
]
218+
if args.offload:
219+
cmake_cmd.extend(
220+
[
221+
"-DUR_BUILD_ADAPTER_OFFLOAD=ON",
222+
]
223+
)
216224

217225
if libclc_enabled:
218226
cmake_cmd.extend(
@@ -343,6 +351,11 @@ def main():
343351
default="AMD",
344352
help="choose hardware platform for HIP backend",
345353
)
354+
parser.add_argument(
355+
"--offload",
356+
action="store_true",
357+
help="Enable UR liboffload adapter (experimental)",
358+
)
346359
parser.add_argument(
347360
"--level_zero_adapter_version",
348361
type=str,

clang/include/clang/Basic/Attr.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ def TargetAnyX86 : TargetArch<["x86", "x86_64"]>;
494494
def TargetSPIRV : TargetArch<["spirv", "spirv32", "spirv64"]>;
495495
def TargetWebAssembly : TargetArch<["wasm32", "wasm64"]>;
496496
def TargetNVPTX : TargetArch<["nvptx", "nvptx64"]>;
497+
def TargetNativeCPU : TargetArch<["native_cpu"]>;
497498
def TargetWindows : TargetSpec {
498499
let OSes = ["Win32"];
499500
}
@@ -4530,6 +4531,11 @@ def RISCVVLSCC: DeclOrTypeAttr, TargetSpecificAttr<TargetRISCV> {
45304531
let Documentation = [RISCVVLSCCDocs];
45314532
}
45324533

4534+
def NativeCPULibclcCall : DeclOrTypeAttr, TargetSpecificAttr<TargetNativeCPU> {
4535+
let Spellings = [Clang<"libclc_call", 0>];
4536+
let Documentation = [Undocumented];
4537+
}
4538+
45334539
def Target : InheritableAttr {
45344540
let Spellings = [GCC<"target">];
45354541
let Args = [StringArgument<"featuresStr">];

0 commit comments

Comments
 (0)