Skip to content

Commit 9ddca50

Browse files
author
Alexander Batashev
authored
[SYCL] Release PI queue on queue_impl destruction (#2108)
The SYCL 1.2.1 specification requires queue to either encapsulate an OpenCL interop object or be a host queue. The DPC++ implementation, however, allows for different backends. Change queue_impl destructor to release whatever native handle there is.
1 parent 6acb812 commit 9ddca50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/source/detail/queue_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class queue_impl {
115115

116116
~queue_impl() {
117117
throw_asynchronous();
118-
if (MOpenCLInterop) {
118+
if (!MHostQueue) {
119119
getPlugin().call<PiApiKind::piQueueRelease>(MCommandQueue);
120120
}
121121
}

0 commit comments

Comments
 (0)