Skip to content
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

Parallel algorithms POC #559

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Parallel algorithms POC #559

wants to merge 12 commits into from

Conversation

breznak
Copy link
Member

@breznak breznak commented Jul 12, 2019

  • proof of concept of running c++17 parallel TS

For #214 #254

This is for your interest, not intended for merging yet.

@breznak breznak added in_progress optimization code code enhancement, optimization, cleanup..programmer stuff labels Jul 12, 2019
@breznak breznak self-assigned this Jul 12, 2019
@breznak breznak mentioned this pull request Jul 12, 2019
4 tasks
Copy link
Member Author

@breznak breznak left a comment

Choose a reason for hiding this comment

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

Please review if there's an obvious error or if the MNIST_SP.cpp settings may be too artificial.
Otherwise my parallelization effort using c++17 TS Parallel has hit the reality.

  • The problem is memory bound
  • execution::par_unseq really puts all threads to a good use
  • MNIST is still slower than single-thread!
    • significantly: 60s (single) vs 240+s (parallel)
    • likely broken cache locality
    • or even CPU throttling (or boosting the only signle thread running)

@@ -844,19 +845,25 @@ void SpatialPooler::inhibitColumnsGlobal_(const vector<Real> &overlaps,
// faster than a regular sort because it stops after it partitions the
// elements about the Nth element, with all elements on their correct side of
// the Nth element.
std::nth_element(
tNth.start();
std::nth_element(htm::parallel::mode,
Copy link
Member Author

Choose a reason for hiding this comment

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

inhibition identified as one of the slowest methods in SP.
nth_element as the most significant in global inh.

@breznak
Copy link
Member Author

breznak commented Aug 6, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code code enhancement, optimization, cleanup..programmer stuff in_progress optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant