Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

#18251 extended device_impls' lifetimes until shutdown and #18270 started to pass devices as raw pointers in some of the APIs.

This PR builds on top of that and extends usage of raw pointers/references/device_range as the devices are known to be alive and extra std::shared_ptr's atomic increments aren't necessary and could be avoided.

Since we change the type of kernel_bundle_impl::MDevices, other APIs in that class don't need to operate in terms of sycl::device or std::shared_ptr<device_impl> and we can switch them to use devices_range instead. A small number of other modifications are caused by these APIs' changes and are necessary to keep the code buildable.

…ce_impl *`

intel#18251 extended `device_impl`s'
lifetimes until shutdown and intel#18270
started to pass devices as raw pointers in some of the APIs.

This PR builds on top of that and extends usage of raw
pointers/references/`device_range` as the devices are known to be alive
and extra `std::shared_ptr`'s atomic increments aren't necessary and
could be avoided.

Since we change the type of `kernel_bundle_impl::MDevices`, other APIs in
that class don't need to operate in terms of `sycl::device` or
`std::shared_ptr<device_impl>` and we can switch them to use `devices_range`
instead. A small number of other modifications are caused by these APIs' changes
and are necessary to keep the code buildable.
@aelovikov-intel aelovikov-intel merged commit 3d1002b into intel:sycl Jul 17, 2025
25 checks passed
@aelovikov-intel aelovikov-intel deleted the kernel_bundle_impl_mdevices branch July 17, 2025 14:10
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