-
-
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
Simd Find #6302
base: master
Are you sure you want to change the base?
Simd Find #6302
Conversation
@@ -34,8 +34,7 @@ namespace hpx::parallel::detail { | |||
sequential_find_t<ExPolicy>, Iterator first, Sentinel last, | |||
T const& value, Proj proj = Proj()) | |||
{ | |||
return util::loop_pred< | |||
std::decay_t<hpx::execution::sequenced_policy>>( | |||
return util::loop_pred<ExPolicy>( |
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.
Could you add static_assert
verifying that ExPolicy
is actually a sequential policy?
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.
Change had been made so sequential_find_t can accept sequential and unsequential execution policies. Do you want me to rather use static_assert(is_seq || is_unseq)
?
libs/core/algorithms/include/hpx/parallel/unseq/simd_helpers.hpp
Outdated
Show resolved
Hide resolved
/* | ||
Compiler and Hardware should also support vector operations for IterDiff, | ||
else we see slower performance when compared to sequential version | ||
*/ |
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.
What does this comment mean? Should that requirement be somehow enforced?
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.
As discussed previously, changing data types can lead to vectorization being broken. I wanted to leave a note for the future regarding it. Use perf regression tests might not be the best way to do this as they often seem to have lot of variance in them.
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.
Well, a comment doesn't help with this, does it? I think setting up performance tests would be the better option. @Pansysk75 can help with that.
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.
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.
Well, I thought we could add it to our performance tests.
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.
added it in a separate PR
libs/core/algorithms/tests/unit/algorithms/util/test_simd_helpers.cpp
Outdated
Show resolved
Hide resolved
Nice! |
Performance test reportHPX PerformanceComparison
Info
Comparison
Info
Comparison
Info
Explanation of Symbols
|
Performance test reportHPX PerformanceComparison
Info
Comparison
Info
Comparison
Info
Explanation of Symbols
|
Performance test reportHPX PerformanceComparison
Info
Comparison
Info
Comparison
Info
Explanation of Symbols
|
@Johan511 could you please fix the reported clang-format issues as well? |
There is one loop yet to be vectorized, once that's done vectorization should be enabled for parallel case too. We can merge after that. |
Performance test reportHPX PerformanceComparison
Info
Comparison
Info
Comparison
Info
Explanation of Symbols
|
@hkaiser the unseq_first_n function has been changed a bit, the the function now takes iterator as input instead of value, this does not break vectorization. |
Signed-off-by: Hari Hara Naveen S <johan511@rostam1.rostam.cct.lsu.edu>
Signed-off-by: Hari Hara Naveen S <johan511@rostam1.rostam.cct.lsu.edu> changing test according to change made to helper Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com> unseq Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
…for function call deduction) Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com> fixed expolicy not accepting par_unseq Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com> cleanup changes Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com> fixing missing concept header Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
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 preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation |
using simd-helpers (from #6286 ) to add vectorization to stl algorithms