-
Notifications
You must be signed in to change notification settings - Fork 225
Dev/asolovev hdbscan sycl #3369
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
base: main
Are you sure you want to change the base?
Dev/asolovev hdbscan sycl #3369
Conversation
@@ -0,0 +1,60 @@ | |||
/******************************************************************************* | |||
* Copyright 2021 Intel Corporation |
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.
We're using a different header now:
https://github.com/uxlfoundation/oneDAL/blob/main/CONTRIBUTING.md#copyright-guidelines-for-contributions
|
||
ONEDAL_ASSERT(min_observations > 0); | ||
ONEDAL_ASSERT( | ||
min_observations <= BEST_CAP && |
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 looks like it should be a runtime error rather than an assertion that is disabled by default.
const std::int64_t i = idx[0]; | ||
const std::int64_t j = idx[1]; | ||
|
||
if (i <= j) { |
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.
You could also make the loop over a 1d array only and then get the (i,j) indices from the corresponding 1d index. Would likely parallelize better.
for (int i = 0; i < n; i++) | ||
for (int j = i + 1; j < n; j++) | ||
edges.emplace_back(i, j, data[i * n + j]); | ||
std::sort(edges.begin(), edges.end(), [](auto& a, auto& b) { |
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.
Does this execute on GPU? If so, shouldn't it use oneDPL?
Description
Checklist:
Completeness and readability
Testing
Performance