Every running process has a training object which launches one or more worker (and server) threads.
More...
|
void | Run (int nworkers, int nservers, const std::map< int, shared_ptr< ParamShard >> &shards) |
|
void | RegisterDefaultClasses (const singa::ModelProto &proto) |
| Register default implementations for all base classes used in the system, e.g., the Updater, BaseMsg, etc. More...
|
|
virtual int | Sharding (int param_id) |
| Workers from the same group resident in the same process share the same ParamShard which contains ParamCounters for Param objects used/updated by these worekrs. More...
|
|
virtual Msg * | HandleGet (shared_ptr< ParamInfo >counter, Msg **msg) |
| Generate a request message to Get the parameter object.
|
|
virtual Msg * | HandleGetResponse (shared_ptr< ParamInfo >counter, Msg **msg) |
|
virtual Msg * | HandleUpdate (shared_ptr< ParamInfo >counter, Msg **msg) |
| Generate a request message to Update the parameter object.
|
|
virtual int | HandleUpdateResponse (shared_ptr< ParamInfo >counter, Msg **msg) |
|
virtual Msg * | HandlePut (shared_ptr< ParamInfo >counter, Msg **msg) |
| Generate a request message to Put the parameter object.
|
|
virtual Msg * | HandleConnect (Msg **msg) |
|
Every running process has a training object which launches one or more worker (and server) threads.
The main thread runs a loop to forward messages between workers and servers.
Register default implementations for all base classes used in the system, e.g., the Updater, BaseMsg, etc.
All built-in layer implementations are registered here. For other base classes, use its base class name (string) as the key and the implementation class as the value, e.g., <"Updater" SGDUpdater>.