Dev/asolovev hdbscan sycl#3369
Draft
Alexandr-Solovev wants to merge 3 commits intouxlfoundation:mainfrom
Draft
Conversation
| @@ -0,0 +1,60 @@ | |||
| /******************************************************************************* | |||
| * Copyright 2021 Intel Corporation | |||
Contributor
There was a problem hiding this comment.
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 && |
Contributor
There was a problem hiding this comment.
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) { |
Contributor
There was a problem hiding this comment.
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) { |
Contributor
There was a problem hiding this comment.
Does this execute on GPU? If so, shouldn't it use oneDPL?
Comment on lines
+75
to
+78
| Float best[BEST_CAP]; | ||
| for (std::int64_t t = 0; t < min_observations; ++t) { | ||
| best[t] = std::numeric_limits<Float>::max(); | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| Float best[BEST_CAP]; | |
| for (std::int64_t t = 0; t < min_observations; ++t) { | |
| best[t] = std::numeric_limits<Float>::max(); | |
| } | |
| std::array<Float, BEST_CAP> best; | |
| best.fill(std::numeric_limits<Float>::max()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Checklist:
Completeness and readability
Testing
Performance