Skip to content

[SYCL] correct sub-device count calculation for numa partitioning #6005

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 2 commits into from
Apr 14, 2022

Conversation

smaslov-intel
Copy link
Contributor

Signed-off-by: Sergey V Maslov [email protected]

@smaslov-intel smaslov-intel requested a review from a team as a code owner April 12, 2022 23:22
@smaslov-intel smaslov-intel changed the title [SYCL] correct sub-de-device count calculation for numa partitioning [SYCL] correct sub-device count calculation for numa partitioning Apr 13, 2022
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.

Only a small nit. Do we have tests for this?

Comment on lines +196 to +203
auto It = Properties.begin() + 1;
size_t TotalCounts = 0;
size_t NonZeroCounts = 0;
for (auto Count : Counts) {
TotalCounts += Count;
NonZeroCounts += (Count != 0) ? 1 : 0;
It = Properties.insert(It, Count);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a comment about what is happening here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

Signed-off-by: Sergey V Maslov <[email protected]>
@smaslov-intel
Copy link
Contributor Author

Only a small nit. Do we have tests for this?

Testing this requires special HW configuration that we don't have in CI and we also can't "REQUIRE" in testing.
I've added checks that will throw clear exceptions if something goes wrong in field.

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.

LGTM!

@steffenlarsen steffenlarsen merged commit ae284f1 into intel:sycl Apr 14, 2022
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