File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,13 @@ class backend_sycl
137
137
#else
138
138
// temporal solution. Started from Sept-2020
139
139
DPCTLSyclQueueRef DPCtrl_queue = DPCTLQueueMgr_GetCurrentQueue ();
140
+ if (DPCtrl_queue == nullptr )
141
+ {
142
+ std::string reason = (DPCTLQueueMgr_GetQueueStackSize () == static_cast <size_t >(-1 ))
143
+ ? " : the queue stack is empty, probably no device is available."
144
+ : " ." ;
145
+ throw std::runtime_error (" Failed to create a copy of SYCL queue with default device" + reason);
146
+ }
140
147
return *(reinterpret_cast <sycl::queue*>(DPCtrl_queue));
141
148
#endif
142
149
}
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ cdef extern from "constants.hpp":
391
391
392
392
cdef extern from " dpnp_iface.hpp" :
393
393
void dpnp_queue_initialize_c(QueueOptions selector)
394
- size_t dpnp_queue_is_cpu_c()
394
+ size_t dpnp_queue_is_cpu_c() except +
395
395
396
396
char * dpnp_memory_alloc_c(size_t size_in_bytes) except +
397
397
void dpnp_memory_free_c(void * ptr)
You can’t perform that action at this time.
0 commit comments