-
Notifications
You must be signed in to change notification settings - Fork 795
[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
Conversation
std::shared_ptr<device_image_impl>
cleanups
@aelovikov-intel I see this is marked as draft, so I understand it is not ready for review. Please, ping when it is :) |
6126458
to
b92cc90
Compare
7b92117
to
9eb691d
Compare
* 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
9eb691d
to
8478dc8
Compare
Ready. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
DeviceImageImplPtr
type alias (not too many uses remaining, doesn't bring much value anymore)std::move
wouldn't be neededdevice_image_impl *
ptrkernel_impl::getDeviceImage
to return raw reference