Skip to content

Commit b07c1d4

Browse files
committed
[UR] Do not call urDeviceRetain() in constructor of device_impl
There is no need to call urDeviceRetain(MDevice) in constructor of device_impl. The current call is excessive and has to be removed, because the devices are not destroyed, since the ref counter drops to 1 only. It fixes URT-961. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent 74d8de6 commit b07c1d4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sycl/source/detail/device_impl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ device_impl::device_impl(ur_device_handle_t Device, platform_impl &Platform,
3030
: get_info_impl<UR_DEVICE_INFO_PARENT_DEVICE>()),
3131
// TODO catch an exception and put it to list of asynchronous exceptions:
3232
MCache{*this} {
33-
// Interoperability Constructor already calls DeviceRetain in
34-
// urDeviceCreateWithNativeHandle.
35-
getAdapter().call<UrApiKind::urDeviceRetain>(MDevice);
33+
// No need to call urDeviceRetain(MDevice) here
3634
}
3735

3836
device_impl::~device_impl() {

0 commit comments

Comments
 (0)