-
Notifications
You must be signed in to change notification settings - Fork 797
[SYCL] Complete transition to Managed<ur_program_handle_t>
RAII model
#19557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
// Should be `std::move(Program)` once `LinkPrograms` is switched to | ||
// `Managed<ur_program_handle_t`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant, context_impl
owns them:
llvm/sycl/source/detail/context_impl.hpp
Lines 135 to 137 in 8861f6b
using CachedLibProgramsT = | |
std::map<std::pair<DeviceLibExt, ur_device_handle_t>, | |
Managed<ur_program_handle_t>>; |
so LinkPrograms
here are non-managed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall.
I like that now we don't have to manually call urProgramRetain/Release.
…uction_ocl.cpp` In preparation for intel#19557 and subsequent leak fix.
…uction_ocl.cpp` In preparation for intel#19557 and subsequent leak fix.
…uction_ocl.cpp` In preparation for intel#19557 and subsequent leak fix.
…uction_ocl.cpp` In preparation for intel#19557 and subsequent leak fix.
Managed<ur_program_handle_t>
RAII modelManaged<ur_program_handle_t>
RAII model
Similar to what's been done with `ur_program_handle_t` in intel#19536 intel#19557
Similar to what's been done with `ur_program_handle_t` in intel#19536 intel#19557
Similar to what's been done with `ur_program_handle_t` in intel#19536 intel#19557
Started in #19536.
Non-NFC because fixes a few resource leaks as can be seen in the updated test.