Skip to content

Commit 1a3e5f6

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into addc
2 parents a26049a + 16e39df commit 1a3e5f6

File tree

799 files changed

+15391
-12457
lines changed

Some content is hidden

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

799 files changed

+15391
-12457
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ sycl/doc/extensions/experimental/sycl_ext_oneapi_bindless_images.asciidoc @intel
156156
sycl/include/sycl/ext/oneapi/bindless* @intel/bindless-images-reviewers
157157
sycl/source/detail/bindless* @intel/bindless-images-reviewers
158158
sycl/plugins/unified_runtime/ur/adapters/**/image.* @intel/bindless-images-reviewers
159+
sycl/test/check_device_code/extensions/bindless_images.cpp @intel/bindless-images-reviewers
159160
sycl/test-e2e/bindless_images/ @intel/bindless-images-reviewers
160161

161162
# Miscellaneous sycl e2e tests

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ jobs:
318318
-DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \
319319
-DSYCL_CTS_MEASURE_BUILD_TIMES=ON \
320320
-DDPCPP_INSTALL_DIR="$(dirname $(which clang++))/.." \
321+
-DCMAKE_CXX_FLAGS="-Wno-missing-template-arg-list-after-template-kw" \
321322
$CMAKE_EXTRA_ARGS
322323
# Ignore errors so that if one category build fails others still have a
323324
# chance to finish and be executed at the run stage. Note that

.github/workflows/sycl-nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
image_options: ${{ matrix.image_options }}
9191
target_devices: ${{ matrix.target_devices }}
9292
tests_selector: ${{ matrix.tests_selector }}
93+
extra_lit_opts: ${{ matrix.extra_lit_opts }}
9394
reset_gpu: ${{ matrix.reset_gpu }}
9495
ref: ${{ github.sha }}
9596
merge_ref: ''

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
shell: bash
8585
run: |
8686
# Run E2E tests.
87-
export LIT_OPTS="-v --no-progress-bar --show-unsupported --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
87+
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
8888
cmake --build build-e2e --target check-sycl-e2e
8989
- name: Cleanup
9090
shell: cmd

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8461,7 +8461,7 @@ def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>,
84618461
Flags<[NoArgumentUnused]>,
84628462
Visibility<[ClangOption, CC1Option, CLOption]>,
84638463
HelpText<"SYCL language standard to compile for.">,
8464-
Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
8464+
Values<"2020">,
84658465
ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>;
84668466

84678467
def fsycl_default_sub_group_size

clang/lib/Basic/Version.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ std::string getClangFullCPPVersion() {
127127

128128
llvm::SmallVector<std::pair<llvm::StringRef, llvm::StringRef>, 2>
129129
getSYCLVersionMacros(const LangOptions &LangOpts) {
130-
if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2017)
131-
return {{"CL_SYCL_LANGUAGE_VERSION", "121"},
132-
{"SYCL_LANGUAGE_VERSION", "201707"}};
133130
if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2020)
134131
return {{"SYCL_LANGUAGE_VERSION", "202001"}};
135132
llvm_unreachable("SYCL standard should be set");

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include "llvm/SYCLLowerIR/MutatePrintfAddrspace.h"
5656
#include "llvm/SYCLLowerIR/RecordSYCLAspectNames.h"
5757
#include "llvm/SYCLLowerIR/SYCLAddOptLevelAttribute.h"
58+
#include "llvm/SYCLLowerIR/SYCLConditionalCallOnDevice.h"
5859
#include "llvm/SYCLLowerIR/SYCLPropagateAspectsUsage.h"
5960
#include "llvm/SYCLLowerIR/SYCLPropagateJointMatrixUsage.h"
6061
#include "llvm/SYCLLowerIR/UtilsSYCLNativeCPU.h"
@@ -994,6 +995,9 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
994995
MPM.addPass(ESIMDVerifierPass(LangOpts.SYCLESIMDForceStatelessMem));
995996
if (Level == OptimizationLevel::O0)
996997
MPM.addPass(ESIMDRemoveOptnoneNoinlinePass());
998+
// SYCLConditionalCallOnDevicePass should be run before
999+
// SYCLPropagateAspectsUsagePass
1000+
MPM.addPass(SYCLConditionalCallOnDevicePass(LangOpts.SYCLUniquePrefix));
9971001
MPM.addPass(SYCLPropagateAspectsUsagePass(
9981002
/*FP64ConvEmu=*/CodeGenOpts.FP64ConvEmu,
9991003
/*ExcludeAspects=*/{"fp64"}));

clang/lib/CodeGen/CGCall.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5714,6 +5714,14 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
57145714
// Apply some call-site-specific attributes.
57155715
// TODO: work this into building the attribute set.
57165716

5717+
if (getContext().getLangOpts().SYCLIsDevice && Callee.isVirtual()) {
5718+
// Annotate virtual calls in SYCL device code to help passes that emit
5719+
// diagnostics on incorrect uses of virtual functions.
5720+
Attrs = Attrs.addFnAttribute(
5721+
getLLVMContext(),
5722+
llvm::Attribute::get(getLLVMContext(), "virtual-call"));
5723+
}
5724+
57175725
// Apply always_inline to all calls within flatten functions.
57185726
// FIXME: should this really take priority over __try, below?
57195727
if (CurCodeDecl && CurCodeDecl->hasAttr<FlattenAttr>() &&

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5907,10 +5907,47 @@ void CodeGenModule::generateIntelFPGAAnnotation(
59075907
}
59085908
}
59095909

5910+
/// Adds global Intel FPGA annotations for a given variable declaration.
5911+
/// This function handles both simple global variables and fields within
5912+
/// structs that are annotated with Intel FPGA attributes. For structs,
5913+
/// it recursively visits all fields and base classes to collect annotations.
5914+
/// \param VD The variable declaration to annotate.
5915+
/// \param GV The LLVM GlobalValue corresponding to the variable declaration.
59105916
void CodeGenModule::addGlobalIntelFPGAAnnotation(const VarDecl *VD,
59115917
llvm::GlobalValue *GV) {
59125918
SmallString<256> AnnotStr;
5919+
5920+
// Handle annotations for fields within a device_global struct.
5921+
if (getLangOpts().IntelFPGA && VD->getType()->isRecordType()) {
5922+
auto RT = VD->getType()->castAs<RecordType>();
5923+
5924+
auto Gen = [&AnnotStr, this](const RecordType *Ty, auto &&Gen) -> void {
5925+
const CXXRecordDecl *RD = cast<CXXRecordDecl>(Ty->getDecl());
5926+
5927+
// Iterate over the fields of the struct.
5928+
for (const auto *Field : RD->fields()) {
5929+
generateIntelFPGAAnnotation(Field, AnnotStr);
5930+
5931+
if (const auto *FT =
5932+
Field->getType()
5933+
->getPointeeOrArrayElementType() // Strip pointers/arrays
5934+
->getAs<RecordType>())
5935+
Gen(FT, Gen);
5936+
}
5937+
5938+
// Iterate over the base classes of the struct.
5939+
for (const auto &Base : RD->bases()) {
5940+
QualType BaseTy = Base.getType();
5941+
5942+
const auto *BRT = BaseTy->castAs<RecordType>();
5943+
Gen(BRT, Gen);
5944+
}
5945+
};
5946+
Gen(RT, Gen);
5947+
}
5948+
59135949
generateIntelFPGAAnnotation(VD, AnnotStr);
5950+
59145951
if (!AnnotStr.empty()) {
59155952
// Get the globals for file name, annotation, and the line number.
59165953
llvm::Constant *AnnoGV = EmitAnnotationString(AnnotStr),

clang/lib/CodeGen/CodeGenTypes.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,6 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
711711
"__spv::__spirv_CooperativeMatrixKHR") {
712712
ResultType = ConvertSPVCooperativeMatrixType(RD);
713713
break;
714-
} else if (RD && RD->getQualifiedNameAsString() ==
715-
"__spv::__spirv_TaskSequenceINTEL") {
716-
ResultType = llvm::TargetExtType::get(getLLVMContext(),
717-
"spirv.TaskSequenceINTEL");
718-
break;
719714
}
720715
}
721716
}

0 commit comments

Comments
 (0)