Skip to content

Commit 18c8076

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into steffen/deprecate_fallback_assert
2 parents b27aedd + 57fb0b8 commit 18c8076

File tree

299 files changed

+13735
-2432
lines changed

Some content is hidden

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

299 files changed

+13735
-2432
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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ 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:
8686
FILTER_6_2: ${{ steps.result.outputs.FILTER_6_2 }}
8787
FILTER_6_3: ${{ steps.result.outputs.FILTER_6_3 }}

.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.

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">];

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13038,6 +13038,8 @@ def err_free_function_first_occurrence_missing_attr: Error<
1303813038
"the first occurrence of SYCL kernel free function should be declared with 'sycl-nd-range-kernel' or 'sycl-single-task-kernel' compile time properties">;
1303913039
def err_free_function_class_method : Error<
1304013040
"%select{static |}0class method cannot be used to define a SYCL kernel free function kernel">;
13041+
def err_sycl_kernel_virtual_arg : Error<
13042+
"argument type '%0' virtually inherited from base class `%1` is not supported as a SYCL kernel argument">;
1304113043

1304213044

1304313045
// SYCL kernel entry point diagnostics

clang/include/clang/Basic/TargetInfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,6 +1711,11 @@ class TargetInfo : public TransferrableTargetInfo,
17111711
return CC_C;
17121712
}
17131713

1714+
/// Gets the calling convention for libclc built-ins for the given target.
1715+
virtual CallingConv getLibclcCallingConv() const {
1716+
return getDefaultCallingConv();
1717+
}
1718+
17141719
/// Get the default atomic options.
17151720
AtomicOptions getAtomicOpts() const { return AtomicOpts; }
17161721

clang/include/clang/Driver/Action.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class Action {
7676
OffloadUnbundlingJobClass,
7777
OffloadWrapperJobClass,
7878
OffloadPackagerJobClass,
79+
OffloadPackagerExtractJobClass,
7980
OffloadDepsJobClass,
8081
SPIRVTranslatorJobClass,
8182
SYCLPostLinkJobClass,
@@ -719,6 +720,17 @@ class OffloadPackagerJobAction : public JobAction {
719720
}
720721
};
721722

723+
class OffloadPackagerExtractJobAction : public JobAction {
724+
void anchor() override;
725+
726+
public:
727+
OffloadPackagerExtractJobAction(ActionList &Inputs, types::ID Type);
728+
729+
static bool classof(const Action *A) {
730+
return A->getKind() == OffloadPackagerExtractJobClass;
731+
}
732+
};
733+
722734
class OffloadDepsJobAction final : public JobAction {
723735
void anchor() override;
724736

clang/include/clang/Driver/Driver.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,9 @@ bool isObjectFile(std::string FileName);
990990
/// \return True if the filename has a static archive/lib extension.
991991
bool isStaticArchiveFile(const StringRef &FileName);
992992

993+
/// \return True if the filename is an Offload Binary file.
994+
bool isOffloadBinaryFile(const StringRef &FileName);
995+
993996
/// \return True if the argument combination will end up generating remarks.
994997
bool willEmitRemarks(const llvm::opt::ArgList &Args);
995998

0 commit comments

Comments
 (0)