Skip to content

Commit 18be196

Browse files
author
Sergey Kanaev
committed
[SYCL] Add missing change past #4694
Signed-off-by: Sergey Kanaev <[email protected]>
1 parent 08b14da commit 18be196

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

sycl/include/CL/sycl/detail/assert_happened.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include <cstdint>
1414

15-
#ifdef __SYCL_DEVICE_ONLY__
15+
#if defined(__SYCL_DEVICE_ONLY__) && __SYCL_USE_FALLBACK_ASSERT
1616
// Reads Flag of AssertHappened on device
1717
SYCL_EXTERNAL __attribute__((weak)) extern "C" void
1818
__devicelib_assert_read(void *);

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,11 @@ __SYCL_WARNING("DPCPP does not support C++ version earlier than C++17. Some "
133133
#warning: DPCPP does not support C++ version earlier than C++17. Some features might not be available.
134134
#endif
135135

136+
// Helper macro to identify if fallback assert is needed
137+
#if defined(SYCL_FALLBACK_ASSERT)
138+
#define __SYCL_USE_FALLBACK_ASSERT SYCL_FALLBACK_ASSERT
139+
#else
140+
#define __SYCL_USE_FALLBACK_ASSERT 0
141+
#endif
142+
136143
#endif

sycl/include/CL/sycl/queue.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,6 @@
6565
#define _KERNELFUNCPARAM(a) const KernelType &a
6666
#endif
6767

68-
// Helper macro to identify if fallback assert is needed
69-
// FIXME remove __NVPTX__ condition once devicelib supports CUDA
70-
#if defined(SYCL_FALLBACK_ASSERT)
71-
#define __SYCL_USE_FALLBACK_ASSERT SYCL_FALLBACK_ASSERT
72-
#else
73-
#define __SYCL_USE_FALLBACK_ASSERT 0
74-
#endif
7568

7669
__SYCL_INLINE_NAMESPACE(cl) {
7770
namespace sycl {

0 commit comments

Comments
 (0)