File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
// *****************************************************************************
2
- // Copyright (c) 2016-2020 , Intel Corporation
2
+ // Copyright (c) 2016-2022 , Intel Corporation
3
3
// All rights reserved.
4
4
//
5
5
// Redistribution and use in source and binary forms, with or without
40
40
(__LIBSYCL_MAJOR_VERSION > major) || (__LIBSYCL_MAJOR_VERSION == major and __LIBSYCL_MINOR_VERSION > minor) || \
41
41
(__LIBSYCL_MAJOR_VERSION == major and __LIBSYCL_MINOR_VERSION == minor and __LIBSYCL_PATCH_VERSION >= patch)
42
42
43
+ /* *
44
+ * Version of SYCL DPC++ 2023 compiler at which transition to SYCL 2020 occurs.
45
+ * Intel(R) oneAPI DPC++ 2022.2.1 compiler has version 20221020L on Linux and
46
+ * 20221101L on Windows.
47
+ */
48
+ #ifndef __SYCL_COMPILER_2023_SWITCHOVER
49
+ #define __SYCL_COMPILER_2023_SWITCHOVER 20221102L
50
+ #endif
51
+
43
52
/* *
44
53
* @defgroup BACKEND_UTILS Backend C++ library utilities
45
54
* @{
Original file line number Diff line number Diff line change 1
1
// *****************************************************************************
2
- // Copyright (c) 2016-2020 , Intel Corporation
2
+ // Copyright (c) 2016-2022 , Intel Corporation
3
3
// All rights reserved.
4
4
//
5
5
// Redistribution and use in source and binary forms, with or without
28
28
#define DPNP_MEMORY_ADAPTER_H
29
29
30
30
#include " queue_sycl.hpp"
31
+ #include " dpnp_utils.hpp"
31
32
32
33
/* *
33
34
* @ingroup BACKEND_UTILS
@@ -84,8 +85,10 @@ class DPNPC_ptr_adapter final
84
85
std::cerr << " \n\t size_in_bytes=" << size_in_bytes;
85
86
std::cerr << " \n\t pointer type=" << (long )src_ptr_type;
86
87
std::cerr << " \n\t queue inorder=" << queue.is_in_order ();
88
+ #if (__SYCL_COMPILER_VERSION < __SYCL_COMPILER_2023_SWITCHOVER)
87
89
std::cerr << " \n\t queue is_host=" << queue.is_host ();
88
90
std::cerr << " \n\t queue device is_host=" << queue.get_device ().is_host ();
91
+ #endif
89
92
std::cerr << " \n\t queue device is_cpu=" << queue.get_device ().is_cpu ();
90
93
std::cerr << " \n\t queue device is_gpu=" << queue.get_device ().is_gpu ();
91
94
std::cerr << " \n\t queue device is_accelerator=" << queue.get_device ().is_accelerator ();
Original file line number Diff line number Diff line change 29
29
30
30
#include < dpnp_iface.hpp>
31
31
#include " queue_sycl.hpp"
32
+ #include " dpnp_utils.hpp"
32
33
33
34
#if defined(DPNP_LOCAL_QUEUE)
34
35
sycl::queue* backend_sycl::queue = nullptr ;
@@ -211,10 +212,14 @@ bool backend_sycl::backend_sycl_is_cpu()
211
212
{
212
213
sycl::queue& qptr = get_queue ();
213
214
214
- if (qptr.is_host () || qptr.get_device ().is_cpu () || qptr.get_device ().is_host ())
215
- {
215
+ if (qptr.get_device ().is_cpu ()) {
216
+ return true ;
217
+ }
218
+ #if (__SYCL_COMPILER_VERSION < __SYCL_COMPILER_2023_SWITCHOVER)
219
+ else if (qptr.is_host () || qptr.get_device ().is_host ()) {
216
220
return true ;
217
221
}
222
+ #endif
218
223
219
224
return false ;
220
225
}
You can’t perform that action at this time.
0 commit comments