-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Fix warnings in source/detail code #16334
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
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
| PersistentDeviceCodeCache::getCompiledKernelFromDisc( | ||
| const std::vector<device> &Devices, const std::string &BuildOptionsString, | ||
| const std::string SourceStr) { | ||
| const std::string &SourceStr) { |
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.
nit: I think more idiomatic fix would be to use std::string_view.
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 am eliminating extra copy here, no intention to change types.
|
|
||
| if (URDevicesSet.size() > 1) { | ||
| // emplace all subsets of the current set of devices into the cache. | ||
| // Set of all devices is not included in the loop as it was already added |
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 think this comment ("Set of all devices is not included...") needs to be moved to the line 832, if I understand the logic correctly.
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.
fixed 19983fe
| // emplace all subsets of the current set of devices into the cache. | ||
| // Set of all devices is not included in the loop as it was already added | ||
| // into the cache. | ||
| for (int Mask = 1; Mask < (1 << URDevicesSet.size()) - 1; ++Mask) { |
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.
This code is much more maintainable than the new one. Also, if the problem is the "overflow" here, then it's inherent part of the problem. We'll have that many entries in the resulting set anyway (and likely OOM regardless).
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.
discussed in person, fixed in 19983fe
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
aelovikov-intel
left a comment
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 once the description is updated.
description is updated now, thanks |
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Fixes places with copy instead of usage by reference or move. Protected potential but unlikely constant overflow with exception. --------- Signed-off-by: Tikhomirova, Kseniya <[email protected]>
Fixes places with copy instead of usage by reference or move.
Protected potential but unlikely constant overflow with exception.