Uploaded image for project: 'Singa'
  1. Singa
  2. SINGA-55

Refactor main.cc and singa.h

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None

    Description

      This ticket is a continuation of SINGA-36.

      A Driver class will be provided, which includes the following functions:

      • Init() to init glogs, gflags (may remove the dependency on flags later); register built-in layers, updaters, etc.; setup folders; init MPI if MPI is used for message passing.
      • RegisterLayer/Updater/Worker/Param, for registering user defined layers, updaters, etc.
      • Submit() for submitting the job configuration.

      The user's main program would then look like :

      #include "singa.h"
      
      int main(int argc, char** argv) {
        singa::Driver driver;
        dirver.Init(argc, argv);
        dirver.RegisterLayer<SubLayerClass>(sublayerID);
        dirver.RegisterUpdater<SubUpdaterClass>(subUpdaterID);
        ...
        // prepare job conf
        driver.Submit(..);
        return 0;
      }
      

      Attachments

        Activity

          People

            wangwei.cs wangwei
            wangwei.cs wangwei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: