-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Add unit test cases and fixes for the S/R versions of the parallel algorithms #6494
Conversation
This commit introduces simple unit test cases for the S/R (Sender and Receiver) versions of the parallel algorithms where they did not exist yet. Note that this is only the first part of these additional test cases, they have not been implemented for every algorithm yet.
Can one of the admins verify this patch? |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
All usages of the tt::sync_wait sender consumer in the recently added unit tests were replaced with equivalent function calls in order to make the tests compatible with NVIDIA's stdexec.
This commit adds the remaining sender adaptor test cases. As of now, it is not planned to add further test cases, as test cases were added to all the algorithms where they are currently of interest.
Wow... Just wow! Thanks a lot for your work on this! |
This commit introduces a first batch of fixes for the S/R versions of some parallel algorithms. However, they are currently all build on a temporary solution for an issue in the "then sender" and therefore not final yet.
- Fly-by: comment out sender tests for algorithms that are not fixed yet
9043ee2
to
f3248db
Compare
…ntation Co-authored-by: isidorostsa <[email protected]>
The guard prevents the use of invocables returning bool in the bulk_async_execute method of the explicit_scheduler_executor to avoid data races. Using such invocables can cause issues because std::vector<return type of the invocable> may be simultaneously written to by multiple threads, which is problematic with std::vector<bool> due to its space optimizations.
This commit introduces a new set of fixes for the S/R versions of several more parallel algorithms and reworks of some previous, buggy fixes. Additionally, new unit test cases have been added for some of the algorithms to cover edge cases such as empty ranges in case they could become pitfalls for the S/R adaptations. This led to the discovery of some general bugs in the algorithms, which were fixed as flybys: * `first_first_of` (+ regression test case) * `ends_with`
Fly-by: Rebalance the two target lists
Flybys: add missing newline at EOF, fix typo
`stellargroup/build_env:14` uses Clang 10, which lacks support for `std::identity`, a type explicitly required for enabling stdexec in HPX. Since `stellargroup/build_env:16` uses Clang 12, switching to it should resolve this issue.
3c5e3c6
to
e2baf86
Compare
Fly-by: Reenable S/R unit test for rotate
d8f0c52
to
427fdfc
Compare
Remove the S/R unit tests of the algorithms that are not fixed yet, since they will fail anyways and currently only pollute the test folder. To resume work on these tests in the future, simply revert this commit.
The unit tests for the S/R versions of the parallel algorithms are only configured if HPX_WITH_STDEXEC is enabled. Additionally, the tests cases that are in headers shared with the non-S/R tests are surrounded with macro guards checking if stdexec is available.
* Add missing headers * Update copyright comments * Make formatting and naming more consistent
427fdfc
to
e0178e3
Compare
This reverts commit 83a180f.
Flyby: Fix formatting issues
This commits reverts other changes that are not related to the aims of this PR, but which were not undone by the previous git reverts.
`transfer_just` was removed in the 10th revision of P2300, this commit replaces its usage in the `explicit_scheduler_executor`.
@hkaiser could you enable testing? |
@zhekemist Should this be merged as is? |
Yes, we can merge this. The CI problems are unrelated. |
Thanks a lot @zhekemist! |
Great work Tobias, thank you for this thorough and well documented contribution! |
This PR has the goal of adding simple unit test cases for the S/R versions of HPX's parallel algorithms where they were previously missing, and to address the issues identified through these test. The fixes are currently based on NVIDIA's stdexec S/R implementation instead of HPX's own S/R implementation. (see PR #6431)
The algorithms addressed in this PR are tracked in this document. Additionally, Issue #6535 was opened to track the algorithms not covered in this PR.
Note that the S/R unit tests for algorithms not yet fixed were removed to avoid cluttering the tests with unnecessary, guaranteed-to-fail test cases. They were removed in commit a20f1b4 and can be restored by reverting this commit if needed.