Skip to content

Commit 93e1a8a

Browse files
Address code-review feedback
1 parent 3b3a5d1 commit 93e1a8a

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ class __SYCL_EXPORT handler {
835835
// disable such checks when this macro is defined. Note that the unittests
836836
// don't actually execute those operation, that's why disabling
837837
// unconditional `static_asserts`s is enough for now.
838-
#ifndef __SYCL_UNITTESTS
838+
#ifndef __SYCL_UNITTESTS_BYPASS_KERNEL_NAME_CHECK
839839
static_assert(Info.Name != std::string_view{}, "Kernel must have a name!");
840840

841841
// Some host compilers may have different captures from Clang. Currently

sycl/test/basic_tests/fp-accuracy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -c -ffp-accuracy=high -faltmathlib=SVMLAltMathLibrary -fno-math-errno %s
1+
// RUN: %clangxx -%fsycl-host-only -c -ffp-accuracy=high -faltmathlib=SVMLAltMathLibrary -fno-math-errno %s
22

33
#include <sycl/sycl.hpp>
44

sycl/test/basic_tests/single_task_error_message.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
1+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
22
#include <iostream>
33
#include <sycl/sycl.hpp>
44
int main() {
@@ -11,7 +11,7 @@ int main() {
1111
myQueue
1212
.single_task([&](sycl::handler &cgh) {
1313
// expected-error-re@sycl/queue.hpp:* {{static assertion failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
14-
// expected-error-re@sycl/detail/kernel_launch_helper.hpp:* {{no matching function for call to object of type 'const (lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
14+
// expected-error-re@sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
1515
})
1616
.wait();
1717
}
@@ -27,7 +27,7 @@ int main() {
2727
.single_task(e,
2828
[&](sycl::handler &cgh) {
2929
// expected-error-re@sycl/queue.hpp:* {{static assertion failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
30-
// expected-error-re@sycl/detail/kernel_launch_helper.hpp:* {{no matching function for call to object of type 'const (lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
30+
// expected-error-re@sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
3131
})
3232
.wait();
3333
}
@@ -43,7 +43,7 @@ int main() {
4343
.single_task(vector_event,
4444
[&](sycl::handler &cgh) {
4545
// expected-error-re@sycl/queue.hpp:* {{static assertion failed due to requirement '{{.*}}': sycl::queue.single_task() requires a kernel instead of command group.{{.*}} Use queue.submit() instead}}
46-
// expected-error-re@sycl/detail/kernel_launch_helper.hpp:* {{no matching function for call to object of type 'const (lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
46+
// expected-error-re@sycl/detail/cg_types.hpp:* {{no matching function for call to object of type '(lambda at {{.*}}single_task_error_message.cpp:{{.*}})'}}
4747
})
4848
.wait();
4949
}

sycl/test/extensions/properties/non_esimd_kernel_fp_control.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -D__SYCL_UNITTESTS %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s
1+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s
22

33
#include <sycl/sycl.hpp>
44

sycl/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
llvm_symbolizer = os.path.join(config.llvm_build_bin_dir, "llvm-symbolizer")
127127
llvm_config.with_environment("LLVM_SYMBOLIZER_PATH", llvm_symbolizer)
128128

129-
sycl_host_only_options = "-std=c++17 -Xclang -fsycl-is-host"
129+
sycl_host_only_options = "-std=c++17 -Xclang -fsycl-is-host -D__SYCL_UNITTESTS_BYPASS_KERNEL_NAME_CHECK=1"
130130
for include_dir in [
131131
config.sycl_include,
132132
config.level_zero_include_dir,

sycl/test/virtual-functions/properties-negative.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -D__SYCL_UNITTESTS %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s
1+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s
22

33
#include <sycl/sycl.hpp>
44

sycl/test/warnings/deprecated_get_backend_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
1+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
22
#include <iostream>
33
#include <sycl/detail/core.hpp>
44
#include <sycl/kernel_bundle.hpp>

sycl/test/warnings/sycl_2020_deprecations.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -fsyntax-only -ferror-limit=0 -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
1+
// RUN: %clangxx %fsycl-host-only -fsyntax-only -ferror-limit=0 -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s
22

33
// expected-warning@CL/sycl.hpp:* {{CL/sycl.hpp is deprecated, use sycl/sycl.hpp}}
44
#include <CL/sycl.hpp>
@@ -283,23 +283,23 @@ int main() {
283283

284284
// expected-warning@+8{{'get_pointer' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
285285
// expected-warning@+7{{'get_pointer<sycl::access::target::device, void>' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
286-
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::global_space, sycl::access::decorated::legacy>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
286+
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::global_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
287287
sycl::multi_ptr<int, sycl::access::address_space::global_space,
288288
sycl::access::decorated::legacy>
289289
LegacyGlobalMptr =
290290
sycl::make_ptr<int, sycl::access::address_space::global_space,
291291
sycl::access::decorated::legacy>(
292292
GlobalAcc.get_pointer());
293293
// expected-warning@+7{{'get_pointer' is deprecated: local_accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
294-
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::local_space, sycl::access::decorated::legacy>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
294+
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::local_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
295295
sycl::multi_ptr<int, sycl::access::address_space::local_space,
296296
sycl::access::decorated::legacy>
297297
LegacyLocalMptr =
298298
sycl::make_ptr<int, sycl::access::address_space::local_space,
299299
sycl::access::decorated::legacy>(
300300
LocalAcc.get_pointer());
301301

302-
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::private_space, sycl::access::decorated::legacy>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
302+
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::private_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
303303
sycl::multi_ptr<int, sycl::access::address_space::private_space,
304304
sycl::access::decorated::legacy>
305305
LegacyPrivateMptr =
@@ -329,27 +329,27 @@ int main() {
329329
sycl::access::decorated::yes>
330330
UndecoratedPrivateMptr = DecoratedPrivateMptr;
331331

332-
// expected-warning@+2{{'operator __global int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
332+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
333333
auto DecoratedGlobalPtr =
334334
static_cast<typename decltype(DecoratedGlobalMptr)::pointer>(
335335
DecoratedGlobalMptr);
336-
// expected-warning@+2{{'operator __local int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
336+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
337337
auto DecoratedLocalPtr =
338338
static_cast<typename decltype(DecoratedLocalMptr)::pointer>(
339339
DecoratedLocalMptr);
340-
// expected-warning@+2{{'operator __private int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
340+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
341341
auto DecoratedPrivatePtr =
342342
static_cast<typename decltype(DecoratedPrivateMptr)::pointer>(
343343
DecoratedPrivateMptr);
344-
// expected-warning@+2{{'operator __global int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
344+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
345345
auto UndecoratedGlobalPtr =
346346
static_cast<typename decltype(UndecoratedGlobalMptr)::pointer>(
347347
UndecoratedGlobalMptr);
348-
// expected-warning@+2{{'operator __local int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
348+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
349349
auto UndecoratedLocalPtr =
350350
static_cast<typename decltype(UndecoratedLocalMptr)::pointer>(
351351
UndecoratedLocalMptr);
352-
// expected-warning@+2{{'operator __private int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
352+
// expected-warning@+2{{'operator int *' is deprecated: Conversion to pointer type is deprecated since SYCL 2020. Please use get() instead.}}
353353
auto UndecoratedPrivatePtr =
354354
static_cast<typename decltype(UndecoratedPrivateMptr)::pointer>(
355355
UndecoratedPrivateMptr);

sycl/unittests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endforeach()
99

1010
add_compile_definitions(SYCL2020_DISABLE_DEPRECATION_WARNINGS SYCL_DISABLE_FSYCL_SYCLHPP_WARNING)
1111

12-
add_compile_definitions(__SYCL_UNITTESTS)
12+
add_compile_definitions(__SYCL_UNITTESTS_BYPASS_KERNEL_NAME_CHECK)
1313

1414
# suppress warnings which came from Google Test sources
1515
if (CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG)

0 commit comments

Comments
 (0)