Safe to Create Multiple Caffe Nets and Solvers in Different Threads?

23 views
Skip to first unread message

Alex Ensafi

unread,
Oct 12, 2017, 9:10:46 PM10/12/17
to Caffe Users
Hi,

Is the most recent Caffe C++ API thread-safe such that the following are officially supported:

  1. Parallel testing - creating and using multiple instances of caffe::Net<> in different threads?
  2. Parallel training - creating and using multiple instances of caffe::Solver<> in different threads?
In both cases, the data being tested via caffe::Net<>::Forward() or trained via caffe::Solver<>::Solve() are completely independent and unrelated.  I need multiple concurrent instances of each object, with simultaneous training and testing taking place on multiple GPUs (if available) or CPUs.  The idea is to use concurrent threads within one process instead of spawning separate processes, in order to avoid the complexities of inter-process communication, shared memory, temporary files and other means of communicating results between processes.  In this context, I do not necessarily need multi-GPU training, so each thread will use a single GPU.

Thank you,

Alex

Reply all
Reply to author
Forward
0 new messages