Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

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

Similar to #19613.

Refactoring has started in
#18143
#18251

Similar to intel#19613.

Refactoring has started in
intel#18143
intel#18251

This didn't work back then due to some unittests failing (because
`global_handler` shutdown is different with unittests) but it doesn't
seem to be an issue any more, probably due to other refactoring PRs that
prefer raw ptr/refs over `std::shared_ptr` elsewhere.

namespace detail {
inline sycl::device &get_current_device_ref() {
static thread_local sycl::device current_device{sycl::default_selector_v};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that could extend sycl::device's lifetime past global_handler destruction when running our unittests, but that device wasn't really usable because we've already released all the UR resources at that point.

@aelovikov-intel
Copy link
Contributor Author

Ping @cperkinsintel

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

@aelovikov-intel aelovikov-intel merged commit 824e751 into intel:sycl Aug 1, 2025
43 of 45 checks passed
@aelovikov-intel aelovikov-intel deleted the context_impl branch August 1, 2025 19:44
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