File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,14 @@ class queue_impl {
69
69
: MDevice(Device), MContext(Context), MAsyncHandler(AsyncHandler),
70
70
MPropList (PropList), MHostQueue(MDevice->is_host ()),
71
71
MOpenCLInterop(!MHostQueue) {
72
- if (!MHostQueue) {
73
- MCommandQueue = createQueue (Order);
74
- }
75
72
if (!Context->hasDevice (Device))
76
73
throw cl::sycl::invalid_parameter_error (
77
74
" Queue cannot be constructed with the given context and device "
78
75
" as the context does not contain the given device." ,
79
76
PI_INVALID_DEVICE);
77
+ if (!MHostQueue) {
78
+ MCommandQueue = createQueue (Order);
79
+ }
80
80
}
81
81
82
82
// / Constructs a SYCL queue from plugin interoperability handle.
@@ -240,6 +240,8 @@ class queue_impl {
240
240
RT::PiContext Context = MContext->getHandleRef ();
241
241
RT::PiDevice Device = MDevice->getHandleRef ();
242
242
const detail::plugin &Plugin = getPlugin ();
243
+
244
+ assert (Plugin.getBackend () == MDevice->getPlugin ().getBackend ());
243
245
RT::PiResult Error = Plugin.call_nocheck <PiApiKind::piQueueCreate>(
244
246
Context, Device, CreationFlags, &Queue);
245
247
You can’t perform that action at this time.
0 commit comments