singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa-doc] nudles commented on issue #14: rearrange contents in dist-train.md
Date Sat, 04 Apr 2020 14:02:12 GMT
nudles commented on issue #14: rearrange contents in dist-train.md
URL: https://github.com/apache/singa-doc/pull/14#issuecomment-609033123
 
 
   Then would it be better to design the APIs in this way:
   1. For training with MPI
   ```python
    # in mnist_mpi.py
   if __name__  == '__main__':
     sgd = ...
     sgd = DistOpt(sgd)
     train_mnist(sgd, sparse, topK)
   ```
   
   2. For training via multiprocessing
   ```python
    # in mnist_multiprocessing.py
   if __name__  == '__main__':
     nccl_id = ...
     sgd = ...
     sgd = DistOpt(sgd, num_gpu, nccl_id)
     train_mnist(sgd, sparse, topK)
   ```
   
   Even if you use socket, multiprocessing can only run on a single node, hence num_gpu =
gpu_per_node.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message