Skip to content

Commit ce050a0

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into add_AOT_support_for_device_asan
2 parents 01bf323 + d130196 commit ce050a0

File tree

229 files changed

+2035
-731
lines changed

Some content is hidden

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

229 files changed

+2035
-731
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5590,7 +5590,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
55905590
// only be used for SPIR/SPIR-V based targets.
55915591
if (Triple.isSPIROrSPIRV())
55925592
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
5593-
options::OPT_fno_sycl_instrument_device_code, true))
5593+
options::OPT_fno_sycl_instrument_device_code, false))
55945594
CmdArgs.push_back("-fsycl-instrument-device-code");
55955595

55965596
if (!SYCLStdArg) {

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
648648
}
649649

650650
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
651-
options::OPT_fno_sycl_instrument_device_code, true))
651+
options::OPT_fno_sycl_instrument_device_code, false))
652652
addLibraries(SYCLDeviceAnnotationLibs);
653653

654654
#if !defined(_WIN32)

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3167,7 +3167,7 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
31673167
// // code
31683168
// }
31693169
//
3170-
// [[intel::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const
3170+
// [[sycl::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const
31713171
// {
31723172
// // code
31733173
// }

clang/lib/Sema/SemaSYCLDeclAttr.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ void SemaSYCL::checkDeprecatedSYCLAttributeSpelling(const ParsedAttr &A,
132132
return;
133133
}
134134

135+
// Additionally, diagnose deprecated [[intel::reqd_sub_group_size]] spelling
136+
if (A.getKind() == ParsedAttr::AT_IntelReqdSubGroupSize && A.getScopeName() &&
137+
A.getScopeName()->isStr("intel")) {
138+
diagnoseDeprecatedAttribute(A, "sycl", "reqd_sub_group_size");
139+
return;
140+
}
141+
135142
// Diagnose SYCL 2020 spellings in later SYCL modes.
136143
if (getLangOpts().getSYCLVersion() >= LangOptions::SYCL_2020) {
137144
// All attributes in the cl vendor namespace are deprecated in favor of a

clang/test/CodeGenSYCL/kernel-op-calls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Functor1 {
1111
public:
1212
Functor1(){}
1313

14-
[[intel::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const {}
14+
[[sycl::reqd_sub_group_size(4)]] void operator()(sycl::id<1> id) const {}
1515

1616
[[sycl::work_group_size_hint(1, 2, 3)]] void operator()(sycl::id<2> id) const {}
1717

clang/test/CodeGenSYCL/reqd-sub-group-size.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ queue q;
77

88
class Functor16 {
99
public:
10-
[[intel::reqd_sub_group_size(16)]] void operator()() const {}
10+
[[sycl::reqd_sub_group_size(16)]] void operator()() const {}
1111
};
1212

1313
template <int SIZE>
1414
class Functor2 {
1515
public:
16-
[[intel::reqd_sub_group_size(SIZE)]] void operator()() const {}
16+
[[sycl::reqd_sub_group_size(SIZE)]] void operator()() const {}
1717
};
1818

1919
template <int N>
20-
[[intel::reqd_sub_group_size(N)]] void func() {}
20+
[[sycl::reqd_sub_group_size(N)]] void func() {}
2121

2222
int main() {
2323
q.submit([&](handler &h) {
2424
Functor16 f16;
2525
h.single_task<class kernel_name1>(f16);
2626

2727
h.single_task<class kernel_name3>(
28-
[]() [[intel::reqd_sub_group_size(4)]]{});
28+
[]() [[sycl::reqd_sub_group_size(4)]]{});
2929

3030
Functor2<2> f2;
3131
h.single_task<class kernel_name4>(f2);

clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ queue q;
77

88
class Functor {
99
public:
10-
[[intel::reqd_sub_group_size(4), cl::reqd_work_group_size(32, 16, 16)]] void operator()() const {}
10+
[[sycl::reqd_sub_group_size(4), cl::reqd_work_group_size(32, 16, 16)]] void operator()() const {}
1111
};
1212

1313
class Functor1 {
1414
public:
15-
[[intel::reqd_sub_group_size(2), sycl::reqd_work_group_size(64, 32, 32)]] void operator()() const {}
15+
[[sycl::reqd_sub_group_size(2), sycl::reqd_work_group_size(64, 32, 32)]] void operator()() const {}
1616
};
1717

1818
template <int SIZE, int SIZE1, int SIZE2>

clang/test/Driver/sycl-device-lib-amdgcn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Check if internal libraries are still linked against when linkage of all
88
// device libs is manually excluded.
99
// RUN: %clangxx -ccc-print-phases -std=c++11 -fsycl -fno-sycl-device-lib=all --sysroot=%S/Inputs/SYCL \
10-
// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 %s 2>&1 \
10+
// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -fsycl-instrument-device-code %s 2>&1 \
1111
// RUN: | FileCheck -check-prefix=CHK-NO-DEVLIB %s
1212

1313
// CHK-NO-DEVLIB-NOT: {{[0-9]+}}: input, "{{.*}}devicelib-amdgcn-amd-amdhsa.bc", ir, (device-sycl, gfx906)

clang/test/Driver/sycl-device-lib-nvptx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Check if internal libraries are still linked against when linkage of all
88
// device libs is manually excluded.
99
// RUN: %clangxx -ccc-print-phases -std=c++11 -fsycl -fno-sycl-device-lib=all --sysroot=%S/Inputs/SYCL \
10-
// RUN: -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
10+
// RUN: -fsycl-targets=nvptx64-nvidia-cuda -fsycl-instrument-device-code %s 2>&1 \
1111
// RUN: | FileCheck -check-prefix=CHK-NO-DEVLIB %s
1212

1313
// CHK-NO-DEVLIB-NOT: {{[0-9]+}}: input, "{{.*}}devicelib-nvptx64-nvidia-cuda.bc", ir, (device-sycl, sm_50)

clang/test/Driver/sycl-early-device-link-old-model.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64_gen \
2424
// RUN: --target=x86_64-unknown-linux-gnu -Xsycl-target-backend \
2525
// RUN: "-device skl" --sysroot=%S/Inputs/SYCL -ccc-print-phases %s \
26-
// RUN: -fno-sycl-device-lib=all 2>&1 \
26+
// RUN: -fsycl-instrument-device-code -fno-sycl-device-lib=all 2>&1 \
2727
// RUN: | FileCheck %s -check-prefix=CREATE_IMAGE_PHASES
2828
// CREATE_IMAGE_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
2929
// CREATE_IMAGE_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)
@@ -70,7 +70,7 @@
7070
// RUN: %clangxx -c -fno-sycl-rdc -fsycl --no-offload-new-driver -fsycl-targets=spir64,spir64_gen \
7171
// RUN: --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
7272
// RUN: -Xsycl-target-backend=spir64_gen "-device skl" \
73-
// RUN: -ccc-print-phases %s -fno-sycl-device-lib=all 2>&1 \
73+
// RUN: -fsycl-instrument-device-code -ccc-print-phases %s -fno-sycl-device-lib=all 2>&1 \
7474
// RUN: | FileCheck %s -check-prefix=JIT_AOT_PHASES
7575
// JIT_AOT_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (device-sycl)
7676
// JIT_AOT_PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)

0 commit comments

Comments
 (0)