Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

device_impls are owned by the parent platforms and are only destroyed when SYCL RT is unloaded. As such, there is no reason to pay the price of a std::shared_ptr, a raw non-owning pointers is enough.

Use a pointer and not a reference because sycl::device is assignable.

Copy link
Contributor Author

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

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

Changes to add explicit detail:: are related to #20820, caused by not including sycl::detail namespace into sycl::device's ADL because of the dropped inheritance.

Comment on lines +33 to +46
platform_impl::platform_impl(ur_platform_handle_t APlatform,
adapter_impl &Adapter)
: MPlatform(APlatform), MAdapter(&Adapter) {

// Find out backend of the platform
ur_backend_t UrBackend = UR_BACKEND_UNKNOWN;
Adapter.call_nocheck<UrApiKind::urPlatformGetInfo>(
APlatform, UR_PLATFORM_INFO_BACKEND, sizeof(ur_backend_t), &UrBackend,
nullptr);
MBackend = convertUrBackend(UrBackend);
}

platform_impl::~platform_impl() = default;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to move to .cpp because it now needs a "complete" device_impl type for MDevices.

`device_impl`s are owned by the parent platforms and are only destroyed
when SYCL RT is unloaded. As such, there is no reason to pay the price
of a `std::shared_ptr` a raw non-owning pointers is enough.

Use a pointer and not a reference because `sycl::device` is assignable.
@slawekptak
Copy link
Contributor

@intel/sycl-graphs-reviewers @reble @KseniyaTikhomirova @sergey-semenov @steffenlarsen A gentle ping for review. Thanks!

@steffenlarsen steffenlarsen added the abi-break change that's breaking abi and waiting for the next window to be able to merge label Dec 15, 2025
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

This LGTM, but beware that it will change ABI in a way that is likely to affect a lot of applications. ABI window is open, but better be aware.

Copy link
Member

@adamfidel adamfidel left a comment

Choose a reason for hiding this comment

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

The change to the CommandGraph unit test looks good to me.

@slawekptak
Copy link
Contributor

@intel/llvm-gatekeepers Please consider merging.

@bader
Copy link
Contributor

bader commented Dec 16, 2025

@intel/llvm-gatekeepers, this PR breaks pre-/post-commit CI on Windows.

@uditagarwal97
Copy link
Contributor

@intel/llvm-gatekeepers, this PR breaks pre-/post-commit CI on Windows.

Here's the fix: #20902

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abi-break change that's breaking abi and waiting for the next window to be able to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants