You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current `device_impl` implementation assumes shared ownership and manages the handle via `urRetain`/`urRelease` in constructor/destructor. Whenever we get temporary device handles via `urDeviceGet`/`urDevicePartition` (which implicitly return device handle with `refcount == 1`) and wrap those handles in `device_impl`, we have to release temporary handles at the end of scope to avoid memory leak. It's done here for devices: https://github.com/intel/llvm/blob/6b29cf120c267118dc8ad737e54e8b844bfb4e06/sycl/source/detail/platform_impl.cpp#L560-L563 Same needs to be done when we create sub-devices. But currently we were missing release calls for temporary handles after creating `device_impl` objects wrapping those handles. This PR fixes that issue by releasing temporary handles at the end of the scope.
0 commit comments