Skip to content

Parallel SpatialPooler, Connections  #254

Open
@breznak

Description

@breznak

Third (the middle) level of proposed parallelization.

This one will make the core algorithm (SP, Connections, TM) run suitable methods in parallel.

PROs:

  • all code benefits (SP, TM), not only if using SPRegion etc
    • bonus if Connection can be optimized this way, as all code: SP, TM, CP uses Conn!
  • even single-task workloads benefit (such as MNIST example #242 MNIST which uses only SP)

CONs:

  • more complex to implement

TODO:

  • find suitable methods in Connections, SP for parallel execution
  • may want to use atomic, lock-less data structures (see project folly)
  • benchmark on MNIST SP MNIST example #242

Naively, I think we could get the most bang/buck by parallelizing the methods:

Connections::computeActivity and NOT using mutex locks. This method is fault tolerant and does not need to be exact.
Connections::adaptSegment which will need mutex lock on conenctions object only when a synapse changes its connected/potential state, so that it can modify the presynaptic-maps. This method would not be parallel, but rather would be thread safe and assume that the caller is parallel. Alternatively if this method were parallel it might be safe to eschew the mutex locks, but I think this alternative would have less performance gain.

from #214 (comment)

Metadata

Metadata

Assignees

Labels

SPTMcodecode enhancement, optimization, cleanup..programmer stuffoptimization

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions