Skip to content

Data Reader#2386

Closed
cypof wants to merge 5 commits intoBVLC:masterfrom
cypof:data_reader
Closed

Data Reader#2386
cypof wants to merge 5 commits intoBVLC:masterfrom
cypof:data_reader

Conversation

@cypof
Copy link
Member

@cypof cypof commented Apr 29, 2015

Part of #2351, but switched to a round-robin way of distributing data to solvers, instead of the shared queue that was not deterministic. Combined with random seeds initialization on threads in #2367, it should make parallel training reproducible.

The data reader sits between a database and each solver's prefetch thread. It makes sure each solver processes a different subset of the database. It also prefetches data, but to host memory, and the amount is configurable. Solvers prefetch threads instead only prefetch a fixed small amount of data, since it is stored in GPU memory.

  • A single reading thread is created per source, even if multiple solvers are running in parallel.
  • Sources are identified by layer name + source path, in case net has multiple data layers on same DB.
  • Databases are read sequentially, for better performance.
  • Each solver sees a different subset of the database.
  • Data is distributed to solvers in a round-robin way to keep parallel training deterministic.

@cypof cypof mentioned this pull request Apr 29, 2015
cypof added 5 commits May 18, 2015 17:24
- Interrupt the thread before waiting on join
- Provide a method for looping threads to exit on demand
- CHECK if start and stop succeed instead of returning an error
- Makes sure each solver accesses a different subset of the data
- Sequential reading of DB for performance
- Prefetches a configurable amount of data to host memory
- Distributes data to solvers in round-robin way for determinism
@shelhamer
Copy link
Member

Merged with revisions in #2903, thanks.

@shelhamer shelhamer closed this Sep 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments