Skip to content

Commit a40747d

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 89cccac + a249316 commit a40747d

File tree

19 files changed

+273
-3
lines changed

19 files changed

+273
-3
lines changed

llvm/lib/SYCLLowerIR/LowerWGScope.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ PreservedAnalyses SYCLLowerWGScopePass::run(Function &F,
786786
Instruction *I = BB.getFirstNonPHI();
787787

788788
for (; I->getOpcode() == Instruction::Alloca ||
789-
I->getOpcode() == Instruction::AddrSpaceCast;
789+
I->getOpcode() == Instruction::AddrSpaceCast ||
790+
I->isDebugOrPseudoInst();
790791
I = I->getNextNode()) {
791792
auto *AllocaI = dyn_cast<AllocaInst>(I);
792793
// Allocas marked with "work_item_scope" are those originating from
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
; RUN: opt < %s -debugify -LowerWGScope -S | FileCheck %s
2+
3+
; Check that debug info is not lost after the LowerWGScope pass.
4+
; Typical case of pfwg + pfwi usage.
5+
6+
%struct.bar = type { i8 }
7+
%struct.zot = type { %struct.widget, %struct.widget, %struct.widget, %struct.foo }
8+
%struct.widget = type { %struct.barney }
9+
%struct.barney = type { [3 x i64] }
10+
%struct.foo = type { %struct.barney }
11+
%struct.foo.0 = type { i8 }
12+
13+
define internal spir_func void @wibble(%struct.bar addrspace(4)* %arg, %struct.zot* byval(%struct.zot) align 8 %arg1) align 2 !work_group_scope !0 {
14+
; CHECK-LABEL: define {{[^@]+}}@wibble
15+
; CHECK-SAME: (%struct.bar addrspace(4)* [[ARG:%.*]], %struct.zot* byval(%struct.zot) align 8 [[ARG1:%.*]])
16+
bb:
17+
%tmp = alloca %struct.bar addrspace(4)*, align 8
18+
; CHECK: [[TMP:%.*]] = alloca %struct.bar addrspace(4)*, align 8
19+
; CHECK: call void @llvm.dbg.value(metadata %struct.bar addrspace(4)** [[TMP]], [[META9:metadata !.*]], metadata !DIExpression())
20+
%tmp1 = alloca %struct.foo.0, align 1
21+
; CHECK: [[TMP1:%.*]] = alloca %struct.foo.0, align 1
22+
; CHECK: call void @llvm.dbg.value(metadata %struct.foo.0* [[TMP1]], [[META11:metadata !.*]], metadata !DIExpression())
23+
store %struct.bar addrspace(4)* %arg, %struct.bar addrspace(4)** %tmp, align 8
24+
%tmp3 = load %struct.bar addrspace(4)*, %struct.bar addrspace(4)** %tmp, align 8
25+
; CHECK: [[TMP3:%.*]] = load %struct.bar addrspace(4)*, %struct.bar addrspace(4)** [[TMP]], align 8
26+
; CHECK: call void @llvm.dbg.value(metadata %struct.bar addrspace(4)* [[TMP3]], [[META12:metadata !.*]], metadata !DIExpression())
27+
%tmp4 = addrspacecast %struct.zot* %arg1 to %struct.zot addrspace(4)*
28+
; CHECK: [[TMP4:%.*]] = addrspacecast %struct.zot* [[ARG1]] to %struct.zot addrspace(4)*
29+
; CHECK: call void @llvm.dbg.value(metadata %struct.zot addrspace(4)* [[TMP4]], [[META13:metadata !.*]], metadata !DIExpression())
30+
call spir_func void @bar(%struct.zot addrspace(4)* %tmp4, %struct.foo.0* byval(%struct.foo.0) align 1 %tmp1)
31+
ret void
32+
}
33+
34+
define internal spir_func void @bar(%struct.zot addrspace(4)* %arg, %struct.foo.0* byval(%struct.foo.0) align 1 %arg1) align 2 !work_item_scope !0 !parallel_for_work_item !0 {
35+
; CHECK-LABEL: define {{[^@]+}}@bar
36+
; CHECK: call void @llvm.dbg.value(metadata i32 0, [[META23:metadata !.*]], metadata !DIExpression())
37+
bb:
38+
ret void
39+
}
40+
41+
!0 = !{}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
; RUN: opt < %s -debugify -LowerWGScope -S | FileCheck %s
2+
;
3+
; Check that debug info is not lost after LowerWGScope pass.
4+
; Case with private_mem usage.
5+
6+
%struct.snork = type { i8 }
7+
%struct.wobble = type { %struct.spam, %struct.spam, %struct.spam, %struct.snork.0 }
8+
%struct.spam = type { %struct.foo }
9+
%struct.foo = type { [2 x i64] }
10+
%struct.snork.0 = type { %struct.foo }
11+
%struct.ham = type { %struct.pluto }
12+
%struct.pluto = type { i32, i32 }
13+
%struct.wibble = type { %struct.ham addrspace(4)* }
14+
15+
define internal spir_func void @wibble(%struct.snork addrspace(4)* dereferenceable_or_null(1) %arg, %struct.wobble* byval(%struct.wobble) align 8 %arg1) align 2 !work_group_scope !0 {
16+
; CHECK-LABEL: define {{[^@]+}}@wibble
17+
; CHECK-SAME: (%struct.snork addrspace(4)* dereferenceable_or_null(1) [[ARG:%.*]], %struct.wobble* byval(%struct.wobble) align 8 [[ARG1:%.*]])
18+
;
19+
bb:
20+
%tmp = alloca %struct.snork addrspace(4)*, align 8
21+
; CHECK: [[TMP:%.*]] = alloca %struct.snork addrspace(4)*, align 8
22+
; CHECK: call void @llvm.dbg.value(metadata %struct.snork addrspace(4)** [[TMP]], [[META9:metadata !.*]], metadata !DIExpression())
23+
%tmp2 = addrspacecast %struct.snork addrspace(4)** %tmp to %struct.snork addrspace(4)* addrspace(4)*
24+
; CHECK: [[TMP2:%.*]] = addrspacecast %struct.snork addrspace(4)** [[TMP]] to %struct.snork addrspace(4)* addrspace(4)*
25+
; CHECK: call void @llvm.dbg.value(metadata %struct.snork addrspace(4)* addrspace(4)* [[TMP2]], [[META11:metadata !.*]], metadata !DIExpression())
26+
%tmp3 = alloca %struct.ham, align 4, !work_item_scope !0
27+
; CHECK: [[TMP3:%.*]] = alloca %struct.ham, align 4, [[DBG24:!dbg !.*]], !work_item_scope !2
28+
; CHECK: call void @llvm.dbg.value(metadata %struct.ham* [[TMP3]], [[META12:metadata !.*]], metadata !DIExpression())
29+
%tmp4 = addrspacecast %struct.ham* %tmp3 to %struct.ham addrspace(4)*
30+
; CHECK: [[TMP4:%.*]] = addrspacecast %struct.ham* [[TMP3]] to %struct.ham addrspace(4)*
31+
; CHECK: call void @llvm.dbg.value(metadata %struct.ham addrspace(4)* [[TMP4]], [[META13:metadata !.*]], metadata !DIExpression())
32+
%tmp5 = alloca %struct.spam, align 8
33+
; CHECK: [[TMP5:%.*]] = alloca %struct.spam, align 8
34+
; CHECK: call void @llvm.dbg.value(metadata %struct.spam* [[TMP5]], [[META14:metadata !.*]], metadata !DIExpression())
35+
%tmp6 = addrspacecast %struct.spam* %tmp5 to %struct.spam addrspace(4)*
36+
; CHECK: [[TMP6:%.*]] = addrspacecast %struct.spam* [[TMP5]] to %struct.spam addrspace(4)*
37+
; CHECK: call void @llvm.dbg.value(metadata %struct.spam addrspace(4)* [[TMP6]], [[META15:metadata !.*]], metadata !DIExpression())
38+
%tmp7 = alloca %struct.wibble, align 8
39+
; CHECK: [[TMP7:%.*]] = alloca %struct.wibble, align 8
40+
; CHECK: call void @llvm.dbg.value(metadata %struct.wibble* [[TMP7]], [[META16:metadata !.*]], metadata !DIExpression())
41+
%tmp8 = addrspacecast %struct.wibble* %tmp7 to %struct.wibble addrspace(4)*
42+
; CHECK: [[TMP8:%.*]] = addrspacecast %struct.wibble* [[TMP7]] to %struct.wibble addrspace(4)*
43+
; CHECK: call void @llvm.dbg.value(metadata %struct.wibble addrspace(4)* [[TMP8]], [[META17:metadata !.*]], metadata !DIExpression())
44+
store %struct.snork addrspace(4)* %arg, %struct.snork addrspace(4)* addrspace(4)* %tmp2, align 8
45+
%tmp9 = addrspacecast %struct.wobble* %arg1 to %struct.wobble addrspace(4)*
46+
; CHECK: [[TMP9:%.*]] = addrspacecast %struct.wobble* [[ARG1]] to %struct.wobble addrspace(4)*
47+
; CHECK: call void @llvm.dbg.value(metadata %struct.wobble addrspace(4)* [[TMP9]], [[META18:metadata !.*]], metadata !DIExpression())
48+
call spir_func void @eggs(%struct.ham addrspace(4)* dereferenceable_or_null(8) %tmp4, %struct.wobble addrspace(4)* align 8 dereferenceable(64) %tmp9)
49+
call spir_func void @snork(%struct.spam addrspace(4)* dereferenceable_or_null(16) %tmp6, i64 7, i64 3)
50+
%tmp10 = getelementptr inbounds %struct.wibble, %struct.wibble addrspace(4)* %tmp8, i32 0, i32 0
51+
; CHECK: [[TMP10:%.*]] = getelementptr inbounds %struct.wibble, %struct.wibble addrspace(4)* [[TMP8]], i32 0, i32 0
52+
; CHECK: call void @llvm.dbg.value(metadata %struct.ham addrspace(4)* addrspace(4)* [[TMP10]], [[META19:metadata !.*]], metadata !DIExpression())
53+
store %struct.ham addrspace(4)* %tmp4, %struct.ham addrspace(4)* addrspace(4)* %tmp10, align 8
54+
%tmp11 = addrspacecast %struct.spam addrspace(4)* %tmp6 to %struct.spam*
55+
; CHECK: [[TMP11:%.*]] = addrspacecast %struct.spam addrspace(4)* [[TMP6]] to %struct.spam*
56+
; CHECK: call void @llvm.dbg.value(metadata %struct.spam* [[TMP11]], [[META20:metadata !.*]], metadata !DIExpression())
57+
%tmp12 = addrspacecast %struct.wibble addrspace(4)* %tmp8 to %struct.wibble*
58+
call spir_func void @wombat(%struct.wobble addrspace(4)* dereferenceable_or_null(64) %tmp9, %struct.spam* byval(%struct.spam) align 8 %tmp11, %struct.wibble* byval(%struct.wibble) align 8 %tmp12)
59+
; CHECK: [[TMP12:%.*]] = addrspacecast %struct.wibble addrspace(4)* [[TMP8]] to %struct.wibble*
60+
; CHECK: call void @llvm.dbg.value(metadata %struct.wibble* [[TMP12]], [[META21:metadata !.*]], metadata !DIExpression())
61+
ret void
62+
}
63+
64+
define linkonce_odr dso_local spir_func void @eggs(%struct.ham addrspace(4)* dereferenceable_or_null(8) %arg, %struct.wobble addrspace(4)* align 8 dereferenceable(64) %arg1) align 2 {
65+
bb:
66+
ret void
67+
}
68+
69+
define internal spir_func void @wombat(%struct.wobble addrspace(4)* dereferenceable_or_null(64) %arg, %struct.spam* byval(%struct.spam) align 8 %arg1, %struct.wibble* byval(%struct.wibble) align 8 %arg2) align 2 !work_item_scope !0 !parallel_for_work_item !0 {
70+
bb:
71+
; CHECK: call void @llvm.dbg.value(metadata i32 0, [[META42:metadata !.*]], metadata !DIExpression())
72+
ret void
73+
}
74+
75+
define linkonce_odr dso_local spir_func void @snork(%struct.spam addrspace(4)* dereferenceable_or_null(16) %arg, i64 %arg1, i64 %arg2) align 2 {
76+
bb:
77+
ret void
78+
}
79+
80+
!0 = !{}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
; RUN: opt < %s -debugify -LowerWGScope -S | FileCheck %s
2+
;
3+
; Check that debug info is not lost after the LowerWGScope pass.
4+
; Case with additional control flow in pfwg.
5+
6+
7+
%struct.snork = type { i32 }
8+
%struct.eggs = type { i8 }
9+
%struct.snork.0 = type { %struct.widget, %struct.widget, %struct.widget, %struct.ham }
10+
%struct.widget = type { %struct.wibble }
11+
%struct.wibble = type { [3 x i64] }
12+
%struct.ham = type { %struct.wibble }
13+
14+
@global = internal addrspace(3) global [12 x %struct.snork] zeroinitializer, align 4
15+
16+
define internal spir_func void @spam(%struct.eggs addrspace(4)* %arg, %struct.snork.0* byval(%struct.snork.0) align 8 %arg1) align 2 !work_group_scope !0 {
17+
; CHECK-LABEL: define {{[^@]+}}@spam
18+
; CHECK-SAME: (%struct.eggs addrspace(4)* [[ARG:%.*]], %struct.snork.0* byval(%struct.snork.0) align 8 [[ARG1:%.*]])
19+
entry:
20+
%tmp = alloca %struct.eggs addrspace(4)*, align 8
21+
; CHECK: [[TMP:%.*]] = alloca %struct.eggs addrspace(4)*, align 8
22+
; CHECK: call void @llvm.dbg.value(metadata %struct.eggs addrspace(4)** [[TMP]], [[META9:metadata !.*]], metadata !DIExpression())
23+
store %struct.eggs addrspace(4)* %arg, %struct.eggs addrspace(4)** %tmp, align 8
24+
%tmp2 = load %struct.eggs addrspace(4)*, %struct.eggs addrspace(4)** %tmp, align 8
25+
; CHECK: [[TMP2:%.*]] = load %struct.eggs addrspace(4)*, %struct.eggs addrspace(4)** [[TMP]], align 8
26+
; CHECK: call void @llvm.dbg.value(metadata %struct.eggs addrspace(4)* [[TMP2]], [[META11:metadata !.*]], metadata !DIExpression())
27+
br label %arrayctor.loop
28+
arrayctor.loop: ; preds = %arrayctor.loop, %entry
29+
%arrayctor.cur = phi %struct.snork addrspace(4)* [ getelementptr inbounds ([12 x %struct.snork], [12 x %struct.snork] addrspace(4)* addrspacecast ([12 x %struct.snork] addrspace(3)* @global to [12 x %struct.snork] addrspace(4)*), i32 0, i32 0), %entry ], [ %arrayctor.next, %arrayctor.loop ]
30+
; CHECK: [[ARRAYCTOR_CUR:%.*]] = phi [[STRUCT_SNORK:%.*]] addrspace(4)* [ getelementptr inbounds ([12 x %struct.snork], [12 x %struct.snork] addrspace(4)* addrspacecast ([12 x %struct.snork] addrspace(3)* @global to [12 x %struct.snork] addrspace(4)*), i32 0, i32 0), [[ENTRY:%.*]] ], [ [[ARRAYCTOR_NEXT:%.*]], [[ARRAYCTOR_LOOP:%.*]] ]
31+
; CHECK: call void @llvm.dbg.value(metadata %struct.snork addrspace(4)* [[ARRAYCTOR_CUR]], [[META12:metadata !.*]], metadata !DIExpression())
32+
call spir_func void @bar(%struct.snork addrspace(4)* %arrayctor.cur)
33+
%arrayctor.next = getelementptr inbounds %struct.snork, %struct.snork addrspace(4)* %arrayctor.cur, i64 1
34+
; CHECK: [[GEP_VAL:%.*]] = getelementptr inbounds %struct.snork, %struct.snork addrspace(4)* [[ARRAYCTOR_CUR]], i64 1
35+
; CHECK: call void @llvm.dbg.value(metadata %struct.snork addrspace(4)* [[GEP_VAL]], [[META13:metadata !.*]], metadata !DIExpression())
36+
%arrayctor.done = icmp eq %struct.snork addrspace(4)* %arrayctor.next, getelementptr inbounds (%struct.snork, %struct.snork addrspace(4)* getelementptr inbounds ([12 x %struct.snork], [12 x %struct.snork] addrspace(4)* addrspacecast ([12 x %struct.snork] addrspace(3)* @global to [12 x %struct.snork] addrspace(4)*), i32 0, i32 0), i64 12)
37+
; CHECK: [[ARRAYCTOR_DONE:%.*]] = icmp eq %struct.snork addrspace(4)* [[WG_VAL_ARRAYCTOR_NEXT:%.*]], getelementptr inbounds (%struct.snork, %struct.snork addrspace(4)* getelementptr inbounds ([12 x %struct.snork], [12 x %struct.snork] addrspace(4)* addrspacecast ([12 x %struct.snork] addrspace(3)* @global to [12 x %struct.snork] addrspace(4)*), i32 0, i32 0), i64 12)
38+
; CHECK: call void @llvm.dbg.value(metadata i1 [[ARRAYCTOR_DONE]], [[META14:metadata !.*]], metadata !DIExpression())
39+
br i1 %arrayctor.done, label %arrayctor.cont, label %arrayctor.loop
40+
41+
arrayctor.cont: ; preds = %arrayctor.loop
42+
ret void
43+
}
44+
45+
define linkonce_odr dso_local spir_func void @bar(%struct.snork addrspace(4)* %arg) unnamed_addr align 2 {
46+
bb:
47+
%tmp = alloca %struct.snork addrspace(4)*, align 8
48+
store %struct.snork addrspace(4)* %arg, %struct.snork addrspace(4)** %tmp, align 8
49+
%tmp1 = load %struct.snork addrspace(4)*, %struct.snork addrspace(4)** %tmp, align 8
50+
%tmp2 = getelementptr inbounds %struct.snork, %struct.snork addrspace(4)* %tmp1, i32 0, i32 0
51+
store i32 0, i32 addrspace(4)* %tmp2, align 4
52+
ret void
53+
}
54+
55+
!0 = !{}

sycl/doc/PreprocessorMacros.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ This behavior is not following the SYCL spec since `constant_ptr` conversions to
1919
the underlying pointer types return pointers without any additional qualifiers
2020
so it's disabled by default.
2121

22+
### SYCL2020_DISABLE_DEPRECATION_WARNINGS
23+
24+
Disables warnings coming from usage of SYCL 1.2.1 APIs, that are deprecated in
25+
SYCL 2020.
26+
27+
### SYCL_DISABLE_DEPRECATION_WARNINGS
28+
29+
Disables all deprecation warnings in SYCL runtime headers, including SYCL 1.2.1 deprecations.
30+
2231
### Version macros
2332

2433
- `__LIBSYCL_MAJOR_VERSION` is set to SYCL runtime library major version.

sycl/include/CL/sycl/buffer.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ class buffer {
224224
}
225225

226226
template <int N = dimensions, typename = EnableIfOneDimension<N>>
227+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
227228
buffer(cl_mem MemObject, const context &SyclContext,
228229
event AvailableEvent = {})
229230
: Range{0} {

sycl/include/CL/sycl/context.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class __SYCL_EXPORT context {
148148
///
149149
/// \param ClContext is an instance of OpenCL cl_context.
150150
/// \param AsyncHandler is an instance of async_handler.
151+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
151152
context(cl_context ClContext, async_handler AsyncHandler = {});
152153

153154
/// Queries this SYCL context for information.
@@ -187,6 +188,7 @@ class __SYCL_EXPORT context {
187188
/// The OpenCL cl_context handle is retained on return.
188189
///
189190
/// \return a valid instance of OpenCL cl_context.
191+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
190192
cl_context get() const;
191193

192194
/// Checks if this context is a SYCL host context.

sycl/include/CL/sycl/detail/defines_elementary.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,26 @@
3939
#endif
4040

4141
#ifndef __SYCL_DEPRECATED
42+
#ifndef SYCL_DISABLE_DEPRECATION_WARNINGS
4243
#ifdef _WIN32
4344
#define __SYCL_DEPRECATED(message) __declspec(deprecated(message))
4445
#else
4546
#define __SYCL_DEPRECATED(message) __attribute__((deprecated(message)))
4647
#endif
48+
#else // SYCL_DISABLE_DEPRECATION_WARNINGS
49+
#define __SYCL_DEPRECATED(message)
50+
#endif // SYCL_DISABLE_DEPRECATION_WARNINGS
4751
#endif // __SYCL_DEPRECATED
4852

53+
#ifndef __SYCL2020_DEPRECATED
54+
#if SYCL_LANGUAGE_VERSION >= 202001 && \
55+
!defined(SYCL2020_DISABLE_DEPRECATION_WARNINGS)
56+
#define __SYCL2020_DEPRECATED(message) __SYCL_DEPRECATED(message)
57+
#else
58+
#define __SYCL2020_DEPRECATED(message)
59+
#endif
60+
#endif // __SYCL2020_DEPRECATED
61+
4962
#ifndef __SYCL_INLINE_CONSTEXPR
5063
// inline constexpr is a C++17 feature
5164
#if __cplusplus >= 201703L

sycl/include/CL/sycl/device.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class __SYCL_EXPORT device {
4040
/// in accordance with the requirements described in 4.3.1.
4141
///
4242
/// \param DeviceId is OpenCL device represented with cl_device_id
43+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
4344
explicit device(cl_device_id DeviceId);
4445

4546
/// Constructs a SYCL device instance using the device selected
@@ -64,6 +65,7 @@ class __SYCL_EXPORT device {
6465
///
6566
/// \return a valid cl_device_id instance in accordance with the requirements
6667
/// described in 4.3.1.
68+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
6769
cl_device_id get() const;
6870

6971
/// Check if device is a host device

sycl/include/CL/sycl/event.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class __SYCL_EXPORT event {
4141
///
4242
/// \param ClEvent is a valid instance of OpenCL cl_event.
4343
/// \param SyclContext is an instance of SYCL context.
44+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
4445
event(cl_event ClEvent, const context &SyclContext);
4546

4647
event(const event &rhs) = default;
@@ -58,6 +59,7 @@ class __SYCL_EXPORT event {
5859
/// Returns a valid OpenCL event interoperability handle.
5960
///
6061
/// \return a valid instance of OpenCL cl_event.
62+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
6163
cl_event get() const;
6264

6365
/// Checks if this event is a SYCL host event.

sycl/include/CL/sycl/image.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class image {
220220
PropList);
221221
}
222222

223+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
223224
image(cl_mem ClMemObject, const context &SyclContext,
224225
event AvailableEvent = {}) {
225226
impl = std::make_shared<detail::image_impl<Dimensions>>(

sycl/include/CL/sycl/platform.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class __SYCL_EXPORT platform {
3939
/// construction.
4040
///
4141
/// \param PlatformId is an OpenCL cl_platform_id instance.
42+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
4243
explicit platform(cl_platform_id PlatformId);
4344

4445
/// Constructs a SYCL platform instance using device selector.
@@ -65,6 +66,7 @@ class __SYCL_EXPORT platform {
6566
/// Returns an OpenCL interoperability platform.
6667
///
6768
/// \return an instance of OpenCL cl_platform_id.
69+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
6870
cl_platform_id get() const;
6971

7072
/// Checks if platform supports specified extension.

sycl/include/CL/sycl/queue.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class __SYCL_EXPORT queue {
142142
/// \param ClQueue is a valid instance of OpenCL queue.
143143
/// \param SyclContext is a valid SYCL context.
144144
/// \param AsyncHandler is a SYCL asynchronous exception handler.
145+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
145146
queue(cl_command_queue ClQueue, const context &SyclContext,
146147
const async_handler &AsyncHandler = {});
147148

@@ -159,6 +160,7 @@ class __SYCL_EXPORT queue {
159160

160161
/// \return a valid instance of OpenCL queue, which is retained before being
161162
/// returned.
163+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
162164
cl_command_queue get() const;
163165

164166
/// \return an associated SYCL context.

sycl/include/CL/sycl/sampler.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class __SYCL_EXPORT sampler {
6868
addressing_mode addressingMode, filtering_mode filteringMode,
6969
const property_list &propList = {});
7070

71+
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
7172
sampler(cl_sampler clSampler, const context &syclContext);
7273

7374
sampler(const sampler &rhs) = default;

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ inline void zeParseError(ze_result_t ZeError, std::string &ErrorString) {
407407

408408
#undef ZE_ERRCASE
409409
default:
410-
assert("Unexpected Error code");
410+
assert(false && "Unexpected Error code");
411411
} // switch
412412
}
413413

sycl/source/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ function(add_sycl_rt_library LIB_NAME)
6161
endif()
6262
endif()
6363

64+
target_compile_definitions(${LIB_OBJ_NAME} PRIVATE SYCL2020_DISABLE_DEPRECATION_WARNINGS)
65+
6466
target_include_directories(
6567
${LIB_OBJ_NAME}
6668
PRIVATE

sycl/source/detail/pi.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ std::ostream &operator<<(std::ostream &Out, const DeviceBinaryProperty &P) {
453453
Out << "[String] ";
454454
break;
455455
default:
456-
assert("unsupported property");
456+
assert(false && "unsupported property");
457457
return Out;
458458
}
459459
Out << P.Prop->Name << "=";

0 commit comments

Comments
 (0)