Skip to content

[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

Merged
merged 32 commits into from
Jul 23, 2025

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented Jul 22, 2025

Started in #19536.

Non-NFC because fixes a few resource leaks as can be seen in the updated test.

@aelovikov-intel aelovikov-intel marked this pull request as ready for review July 22, 2025 22:44
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner July 22, 2025 22:44
Comment on lines -1766 to -1767
// Should be `std::move(Program)` once `LinkPrograms` is switched to
// `Managed<ur_program_handle_t`:
Copy link
Contributor Author

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:

using CachedLibProgramsT =
std::map<std::pair<DeviceLibExt, ur_device_handle_t>,
Managed<ur_program_handle_t>>;

so LinkPrograms here are non-managed.

Copy link
Contributor

@uditagarwal97 uditagarwal97 left a 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.

@aelovikov-intel aelovikov-intel marked this pull request as draft July 23, 2025 16:46
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 23, 2025
…uction_ocl.cpp`

In preparation for intel#19557 and
subsequent leak fix.
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 23, 2025
…uction_ocl.cpp`

In preparation for intel#19557 and
subsequent leak fix.
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 23, 2025
…uction_ocl.cpp`

In preparation for intel#19557 and
subsequent leak fix.
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 23, 2025
…uction_ocl.cpp`

In preparation for intel#19557 and
subsequent leak fix.
aelovikov-intel added a commit that referenced this pull request Jul 23, 2025
…ruction_ocl.cpp` (#19565)

In preparation for #19557 and
subsequent leak fix.
@aelovikov-intel aelovikov-intel changed the title [NFC][SYCL] Complete transition to Managed<ur_program_handle_t> RAII model [SYCL] Complete transition to Managed<ur_program_handle_t> RAII model Jul 23, 2025
@aelovikov-intel aelovikov-intel marked this pull request as ready for review July 23, 2025 20:36
@aelovikov-intel aelovikov-intel merged commit 6653a66 into intel:sycl Jul 23, 2025
25 checks passed
@aelovikov-intel aelovikov-intel deleted the managed branch July 23, 2025 22:12
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 23, 2025
Similar to what's been done with `ur_program_handle_t` in
intel#19536
intel#19557
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 24, 2025
Similar to what's been done with `ur_program_handle_t` in
intel#19536
intel#19557
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jul 24, 2025
Similar to what's been done with `ur_program_handle_t` in
intel#19536
intel#19557
aelovikov-intel added a commit that referenced this pull request Jul 25, 2025
Similar to what's been done with `ur_program_handle_t` in
#19536
#19557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants