Skip to content

Commit c99766a

Browse files
[SYCL] Deprecate __SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ (#15623)
The default was flipped in #13055, we can deprecate now and remove during the next ABI breaking window. Also, guard with `__INTEL_PREVIEW_BREAKING_CHANGES` to ensure that removal will actually happen.
1 parent fa1615e commit c99766a

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,15 @@ __clc_BarrierTestWait(int64_t *state, int64_t arrival) noexcept;
13651365
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL __SYCL_EXPORT void
13661366
__clc_BarrierArriveAndWait(int64_t *state) noexcept;
13671367

1368-
#ifdef __SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__
1368+
#if defined(__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__) && \
1369+
!defined(__INTEL_PREVIEW_BREAKING_CHANGES)
1370+
#if defined(__clang__)
1371+
#pragma clang diagnostic push
1372+
#pragma clang diagnostic ignored "-Wpedantic"
1373+
#warning \
1374+
"__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ is deprecated and will be removed in a future release."
1375+
#pragma clang diagnostic pop
1376+
#endif
13691377
extern __DPCPP_SYCL_EXTERNAL int
13701378
__spirv_ocl_printf(const __attribute__((opencl_constant)) char *Format, ...);
13711379
extern __DPCPP_SYCL_EXTERNAL int __spirv_ocl_printf(const char *Format, ...);

sycl/test-e2e/Basic/built-ins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %{build} -o %t.out
22
// RUN: %{run} %t.out | FileCheck %s
33

4-
// RUN: %{build} -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -o %t_var.out
4+
// RUN: %{build} -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -Wno-#warnings -o %t_var.out
55
// RUN: %{run} %t_var.out | FileCheck %s
66

77
// Hits an assertion with AMD:

sycl/test-e2e/DeviceLib/built-ins/printf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %{build} -o %t.out
66
// RUN: %{run} %t.out | FileCheck %s
77
//
8-
// RUN: %{build} -fsycl-device-code-split=per_kernel -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -o %t_var.out
8+
// RUN: %{build} -fsycl-device-code-split=per_kernel -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -Wno-#warnings -o %t_var.out
99
// RUN: %{run} %t_var.out | FileCheck %s
1010

1111
#include <sycl/detail/core.hpp>

sycl/test-e2e/ESIMD/printf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: %{build} -o %t.out
1111
// RUN: %{run} %t.out | FileCheck %s
1212
//
13-
// RUN: %{build} -fsycl-device-code-split=per_kernel -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -o %t_var.out
13+
// RUN: %{build} -fsycl-device-code-split=per_kernel -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -Wno-#warnings -o %t_var.out
1414
// RUN: %{run} %t_var.out | FileCheck %s
1515
//
1616
//===----------------------------------------------------------------------===//

sycl/test-e2e/Printf/float.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// RUN: %{build} -o %t.out
1010
// RUN: %{run} %t.out | FileCheck %s
1111
// FIXME: Remove dedicated variadic printf testing once the option is removed.
12-
// RUN: %{build} -o %t.nonvar.out -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__
12+
// RUN: %{build} -o %t.nonvar.out -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -Wno-#warnings
1313
// RUN: %{run} %t.nonvar.out | FileCheck %s
1414
// FIXME: Remove dedicated constant address space testing once generic AS
1515
// support is considered stable.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: %clangxx -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
2+
3+
// expected-warning@*:* {{__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ is deprecated and will be removed in a future release.}}
4+
#include <sycl/sycl.hpp>
5+

0 commit comments

Comments
 (0)