Skip to content

[NFC][SYCL] std::shared_ptr<device_image_impl> cleanups #19506

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 1 commit into from
Jul 24, 2025

Conversation

aelovikov-intel
Copy link
Contributor

  • Avoid unnecessary copies
  • Use rvalue-reference if param is getting moved from
  • Remove DeviceImageImplPtr type alias (not too many uses remaining, doesn't bring much value anymore)
  • Inline some temporaries so that explicit std::move wouldn't be needed
  • Switch some sets to use raw device_image_impl * ptr
  • kernel_impl::getDeviceImage to return raw reference

@aelovikov-intel aelovikov-intel requested a review from a team as a code owner July 17, 2025 18:36
@aelovikov-intel aelovikov-intel changed the title [NFC][SYCL] std::shared_ptr<device_image_impl>` cleanups [NFC][SYCL] std::shared_ptr<device_image_impl> cleanups Jul 17, 2025
@aelovikov-intel aelovikov-intel marked this pull request as draft July 17, 2025 19:25
@maarquitos14
Copy link
Contributor

@aelovikov-intel I see this is marked as draft, so I understand it is not ready for review. Please, ping when it is :)

* Avoid unnecessary copies
* Use rvalue-reference if param is getting moved from (except `device_image` ctor)
* Remove `DeviceImageImplPtr` type alias (not too many uses remaining,
  doesn't bring much value anymore)
* Inline some temporaries so that explicit `std::move` wouldn't be
  needed
* Switch some sets to use raw `device_image_impl *` ptr
* `kernel_impl::getDeviceImage` to return raw reference
@aelovikov-intel aelovikov-intel marked this pull request as ready for review July 24, 2025 15:10
@aelovikov-intel
Copy link
Contributor Author

@aelovikov-intel I see this is marked as draft, so I understand it is not ready for review. Please, ping when it is :)

Ready.

Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM, just a question.

@@ -3031,16 +3028,14 @@ ProgramManager::link(const std::vector<device_image_plain> &Imgs,
}
auto MergedRTCInfo = detail::KernelCompilerBinaryInfo::Merge(RTCInfoPtrs);

DeviceImageImplPtr ExecutableImpl = device_image_impl::create(
// TODO: Make multiple sets of device images organized by devices they are
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this something we still want to do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't even know what exactly this means... Thus, keep it for now, if somebody knows for sure this isn't necessary, then should be removed in a dedicated PR with an explanation why.

@aelovikov-intel aelovikov-intel merged commit 35371f6 into intel:sycl Jul 24, 2025
25 checks passed
@aelovikov-intel aelovikov-intel deleted the device_image_impl branch July 24, 2025 19:20
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