Skip to content

[SYCL] Fix ModuleSplitterBase::totalSplits usage #7485

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

AlexeySachkov
Copy link
Contributor

ModuleSplitterBase::totalSplits method returns the amount of remaining splits, i.e. every call to ModuleSplitterBase::nextSplit decrements that value.

Fixed an incorrect initialization of SplitByMode and SplitByOptionalFeatures variables by re-arranging code so we ask for amount of splits before we extract them. Previously, those two variables were always initialized with false: from what I see in a code this shouldn't have resulted in any major issues, but it caused a problem in a downstream.

`ModuleSplitterBase::totalSplits` method returns the amount of
_remaining_ splits, i.e. every call to `ModuleSplitterBase::nextSplit`
decrements that value.

Fixed an incorrect initialization of `SplitByMode` and
`SplitByOptionalFeatures` variables by re-arranging code so we ask for
amount of splits _before_ we extract them. Previously, those two
variables were always initialized with `false`: from what I see in a
code this shouldn't have resulted in any major issues, but it caused a
problem in a downstream.
@AlexeySachkov AlexeySachkov requested a review from a team as a code owner November 22, 2022 11:11
Renamed the method to `remainingSplits` to avoid confusion.
Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

Nice!

@AlexeySachkov AlexeySachkov merged commit dcc2ffc into intel:sycl Nov 22, 2022
@AlexeySachkov AlexeySachkov deleted the private/asachkov/fix-total-spllits-usage-in-sycl-post-link branch March 29, 2023 12:26
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