Skip to content

Commit 4f43c32

Browse files
authored
Merge branch 'intel:sycl' into int-buffers
2 parents 5e6f37c + b8204f8 commit 4f43c32

File tree

212 files changed

+1285
-36599
lines changed

Some content is hidden

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

212 files changed

+1285
-36599
lines changed

clang/test/Driver/clang-linker-wrapper.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,20 @@
6363
// CHK-CMDS-AOT-GEN: spirv-to-ir-wrapper{{.*}} -o [[FIRSTLLVMLINKIN:.*]].bc --llvm-spirv-opts --spirv-preserve-auxdata --spirv-target-env=SPV-IR --spirv-builtin-format=global
6464
// CHK-CMDS-AOT-GEN-NEXT: llvm-link{{.*}} --suppress-warnings [[FIRSTLLVMLINKIN]].bc -o [[FIRSTLLVMLINKOUT:.*]].bc
6565
// CHK-CMDS-AOT-GEN-NEXT: llvm-link{{.*}} -only-needed --suppress-warnings [[FIRSTLLVMLINKOUT]].bc {{.*}}.bc -o [[SECONDLLVMLINKOUT:.*]].bc
66-
// CHK-CMDS-AOT-GEN-NEXT: sycl-post-link{{.*}} SYCL_POST_LINK_OPTIONS -o [[SYCLPOSTLINKOUT:.*]].table [[SECONDLLVMLINKOUT]].bc
66+
// Check that target specified by -fsycl-targets is passed to sycl-post-link for filtering.
67+
// CHK-CMDS-AOT-GEN-NEXT: sycl-post-link{{.*}} SYCL_POST_LINK_OPTIONS -o intel_gpu_pvc,[[SYCLPOSTLINKOUT:.*]].table [[SECONDLLVMLINKOUT]].bc
6768
// CHK-CMDS-AOT-GEN-NEXT: llvm-spirv{{.*}} LLVM_SPIRV_OPTIONS -o {{.*}}
6869
// CHK-CMDS-AOT-GEN-NEXT: ocloc{{.*}} -output_no_suffix -spirv_input -device pvc{{.*}} -output {{.*}} -file {{.*}}
6970
// CHK-CMDS-AOT-GEN-NEXT: offload-wrapper: output: [[WRAPPEROUT:.*]].bc, input: {{.*}}, compile-opts: , link-opts:
7071
// CHK-CMDS-AOT-GEN-NEXT: clang{{.*}} -c -o [[LLCOUT:.*]].o [[WRAPPEROUT]].bc
7172
// CHK-CMDS-AOT-GEN-NEXT: "{{.*}}/ld" -- HOST_LINKER_FLAGS -dynamic-linker HOST_DYN_LIB -o a.out [[LLCOUT]].o HOST_LIB_PATH HOST_STAT_LIB {{.*}}.o
7273

74+
// Check that when --gpu-tool-arg is specified in clang-linker-wrapper
75+
// (happen when AOT device is specified via -Xsycl-target-backend '-device pvc' in clang),
76+
// the target is not passed to sycl-post-link for filtering.
77+
// RUN: clang-linker-wrapper -sycl-embed-ir -sycl-device-libraries=%t1.devicelib.o -sycl-post-link-options="SYCL_POST_LINK_OPTIONS" -llvm-spirv-options="LLVM_SPIRV_OPTIONS" "--host-triple=x86_64-unknown-linux-gnu" "--gpu-tool-arg=-device pvc" "--linker-path=/usr/bin/ld" "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" HOST_LIB_PATH HOST_STAT_LIB %t1.o --dry-run 2>&1 | FileCheck -check-prefix=CHK-NO-CMDS-AOT-GEN %s
78+
// CHK-NO-CMDS-AOT-GEN-NOT: sycl-post-link{{.*}} -o intel_gpu_pv,{{.*}}
79+
7380
/// Check for list of commands for standalone clang-linker-wrapper run for sycl (AOT for Intel CPU)
7481
// -------
7582
// Generate .o file as linker wrapper input.

clang/test/SemaSYCL/attr-add-ir-attributes-function-conflict.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ int main() {
112112
NonemptyWrapper.kernel_single_task<class NEK9>([]() [[sycl::device_has(sycl::aspect::cpu)]] {});
113113
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
114114
NonemptyWrapper.kernel_single_task<class NEK10>([]() [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
115+
// expected-warning@+4 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
116+
// expected-warning@+3 {{kernel has both attribute 'sycl::work_group_size_hint' and kernel properties; conflicting properties are ignored}}
117+
// expected-warning@+2 {{kernel has both attribute 'sycl::reqd_sub_group_size' and kernel properties; conflicting properties are ignored}}
118+
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
119+
NonemptyWrapper.kernel_single_task<class NEK11>([]() [[sycl::reqd_work_group_size(1)]] [[sycl::work_group_size_hint(1)]] [[sycl::reqd_sub_group_size(1)]] [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
115120

116121
// expected-warning@+1 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
117122
NonemptyWrapperWithImplicit.kernel_single_task<class NEKWI1>([]() [[sycl::reqd_work_group_size(1)]] {});
@@ -133,6 +138,11 @@ int main() {
133138
NonemptyWrapperWithImplicit.kernel_single_task<class NEKWI9>([]() [[sycl::device_has(sycl::aspect::cpu)]] {});
134139
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
135140
NonemptyWrapperWithImplicit.kernel_single_task<class NEKWI10>([]() [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
141+
// expected-warning@+4 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
142+
// expected-warning@+3 {{kernel has both attribute 'sycl::work_group_size_hint' and kernel properties; conflicting properties are ignored}}
143+
// expected-warning@+2 {{kernel has both attribute 'sycl::reqd_sub_group_size' and kernel properties; conflicting properties are ignored}}
144+
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
145+
NonemptyWrapperWithImplicit.kernel_single_task<class NEKWI11>([]() [[sycl::reqd_work_group_size(1)]] [[sycl::work_group_size_hint(1)]] [[sycl::reqd_sub_group_size(1)]] [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
136146

137147
// expected-warning@+1 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
138148
NonemptyWrapperWithFilter.kernel_single_task<class NEKWF1>([]() [[sycl::reqd_work_group_size(1)]] {});
@@ -154,6 +164,11 @@ int main() {
154164
NonemptyWrapperWithFilter.kernel_single_task<class NEKWF9>([]() [[sycl::device_has(sycl::aspect::cpu)]] {});
155165
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
156166
NonemptyWrapperWithFilter.kernel_single_task<class NEKWF10>([]() [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
167+
// expected-warning@+4 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
168+
// expected-warning@+3 {{kernel has both attribute 'sycl::work_group_size_hint' and kernel properties; conflicting properties are ignored}}
169+
// expected-warning@+2 {{kernel has both attribute 'sycl::reqd_sub_group_size' and kernel properties; conflicting properties are ignored}}
170+
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
171+
NonemptyWrapperWithFilter.kernel_single_task<class NEKWF11>([]() [[sycl::reqd_work_group_size(1)]] [[sycl::work_group_size_hint(1)]] [[sycl::reqd_sub_group_size(1)]] [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
157172

158173
// expected-warning@+1 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
159174
NonemptyWrapperWithImplicitAndFilter.kernel_single_task<class NEKWIF1>([]() [[sycl::reqd_work_group_size(1)]] {});
@@ -175,4 +190,9 @@ int main() {
175190
NonemptyWrapperWithImplicitAndFilter.kernel_single_task<class NEKWIF9>([]() [[sycl::device_has(sycl::aspect::cpu)]] {});
176191
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
177192
NonemptyWrapperWithImplicitAndFilter.kernel_single_task<class NEKWIF10>([]() [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
193+
// expected-warning@+4 {{kernel has both attribute 'sycl::reqd_work_group_size' and kernel properties; conflicting properties are ignored}}
194+
// expected-warning@+3 {{kernel has both attribute 'sycl::work_group_size_hint' and kernel properties; conflicting properties are ignored}}
195+
// expected-warning@+2 {{kernel has both attribute 'sycl::reqd_sub_group_size' and kernel properties; conflicting properties are ignored}}
196+
// expected-warning@+1 {{kernel has both attribute 'sycl::device_has' and kernel properties; conflicting properties are ignored}}
197+
NonemptyWrapperWithImplicitAndFilter.kernel_single_task<class NEKWIF11>([]() [[sycl::reqd_work_group_size(1)]] [[sycl::work_group_size_hint(1)]] [[sycl::reqd_sub_group_size(1)]] [[sycl::device_has(sycl::aspect::cpu, sycl::aspect::gpu)]] {});
178198
}

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,10 +727,24 @@ runSYCLPostLinkTool(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
727727
createOutputFile(sys::path::filename(ExecutableName), "table");
728728
if (!TempFileOrErr)
729729
return TempFileOrErr.takeError();
730+
std::string OutputPathWithArch = TempFileOrErr->str();
731+
732+
// Enable the driver to invoke sycl-post-link with the device architecture
733+
// when Intel GPU targets are passed in -fsycl-targets.
734+
// OPT_gpu_tool_arg_EQ is checked to ensure the device architecture is not
735+
// passed through -Xsycl-target-backend=spir64_gen "-device <arch>" format
736+
const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
737+
StringRef Arch = Args.getLastArgValue(OPT_arch_EQ);
738+
StringRef IsGPUTool = Args.getLastArgValue(OPT_gpu_tool_arg_EQ);
739+
740+
if (Triple.getSubArch() == llvm::Triple::SPIRSubArch_gen && !Arch.empty() &&
741+
IsGPUTool.empty() && Arch != "*")
742+
OutputPathWithArch = "intel_gpu_" + Arch.str() + "," + OutputPathWithArch;
743+
else if (Triple.getSubArch() == llvm::Triple::SPIRSubArch_x86_64)
744+
OutputPathWithArch = "spir64_x86_64," + OutputPathWithArch;
730745

731746
SmallVector<StringRef, 8> CmdArgs;
732747
CmdArgs.push_back(*SYCLPostLinkPath);
733-
const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
734748
Arg *SYCLDeviceLibLoc = Args.getLastArg(OPT_sycl_device_library_location_EQ);
735749
if (SYCLDeviceLibLoc && !Triple.isSPIRAOT()) {
736750
std::string SYCLDeviceLibLocParam = SYCLDeviceLibLoc->getValue();
@@ -748,7 +762,7 @@ runSYCLPostLinkTool(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
748762
SYCLPostLinkOptions.split(CmdArgs, " ", /* MaxSplit = */ -1,
749763
/* KeepEmpty = */ false);
750764
CmdArgs.push_back("-o");
751-
CmdArgs.push_back(*TempFileOrErr);
765+
CmdArgs.push_back(Args.MakeArgString(OutputPathWithArch));
752766
for (auto &File : InputFiles)
753767
CmdArgs.push_back(File);
754768
if (Error Err = executeCommands(*SYCLPostLinkPath, CmdArgs))

devops/actions/run-tests/benchmark/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ runs:
231231
WORKDIR="$(realpath ./llvm_test_workdir)"
232232
if [ -n "$WORKDIR" ] && [ -d "$WORKDIR" ] && [[ "$WORKDIR" == *llvm_test_workdir* ]]; then rm -rf "$WORKDIR" ; fi
233233

234+
# Clean up potentially existing, old summary files
235+
[ -f "github_summary_exe.md" ] && rm github_summary_exe.md
236+
[ -f "github_summary_reg.md" ] && rm github_summary_reg.md
237+
234238
numactl --cpunodebind "$NUMA_NODE" --membind "$NUMA_NODE" \
235239
./devops/scripts/benchmarks/main.py "$WORKDIR" \
236240
--sycl "$(realpath ./toolchain)" \
@@ -243,6 +247,7 @@ runs:
243247
--preset "$PRESET" \
244248
--timestamp-override "$SAVE_TIMESTAMP" \
245249
--detect-version sycl,compute_runtime \
250+
--produce-github-summary \
246251
${{ inputs.exit_on_failure == 'true' && '--exit-on-failure --iterations 1' || '' }}
247252
# TODO: add back: "--flamegraph inclusive" once works properly
248253

@@ -273,8 +278,9 @@ runs:
273278
if: always()
274279
shell: bash
275280
run: |
276-
# Cache changes and upload github summary
277-
[ -f "github_summary.md" ] && cat github_summary.md >> $GITHUB_STEP_SUMMARY
281+
# Cache changes and upload github summaries
282+
[ -f "github_summary_exe.md" ] && cat github_summary_exe.md >> $GITHUB_STEP_SUMMARY
283+
[ -f "github_summary_reg.md" ] && cat github_summary_reg.md >> $GITHUB_STEP_SUMMARY
278284
279285
cd "./llvm-ci-perf-results"
280286
git add .

devops/scripts/benchmarks/benches/compute.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def git_url(self) -> str:
6161
return "https://github.com/intel/compute-benchmarks.git"
6262

6363
def git_hash(self) -> str:
64-
# Nov 7, 2025
65-
return "d985da634fc1a9416ca0bd067cfb9886b02d0211"
64+
# Nov 17, 2025
65+
return "932ae79f7cca7e156285fc10a59610927c769e89"
6666

6767
def setup(self) -> None:
6868
if options.sycl is None:
@@ -860,6 +860,7 @@ def _bin_args(self, run_trace: TracingType = TracingType.NONE) -> list[str]:
860860
"--multiplier=1",
861861
"--vectorSize=1",
862862
"--lws=256",
863+
"--prefetch=0",
863864
]
864865

865866

devops/scripts/benchmarks/compare.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ def to_hist(
357357
parser_avg.add_argument(
358358
"--produce-github-summary",
359359
action="store_true",
360-
help=f"Create a summary file '{options.github_summary_filename}' for Github workflow summaries.",
360+
help=f"Produce regression summary for Github workflow, in file '{options.github_summary_regression_filename}'.",
361+
default=False,
361362
)
362363

363364
args = parser.parse_args()
@@ -473,14 +474,16 @@ def print_regression(entry: dict, is_warning: bool = False):
473474

474475
if not args.dry_run:
475476
if args.produce_github_summary:
476-
with open(options.github_summary_filename, "w") as f:
477+
with open(options.github_summary_regression_filename, "w") as f:
477478
f.write("\n".join(gh_summary))
478479
exit(1) # Exit 1 to trigger Github test failure
479480

480481
log.info("No unexpected regressions found!")
481482
if args.produce_github_summary:
483+
gh_summary.append("")
484+
gh_summary.append("### Regressions")
482485
gh_summary.append("No unexpected regressions found!")
483-
with open(options.github_summary_filename, "w") as f:
486+
with open(options.github_summary_regression_filename, "w") as f:
484487
f.write("\n".join(gh_summary))
485488

486489
else:

0 commit comments

Comments
 (0)