rahul003 commented on a change in pull request #10696: [MXNET-366]Extend MXNet 
Distributed Training by AllReduce
URL: https://github.com/apache/incubator-mxnet/pull/10696#discussion_r195272925
 
 

 ##########
 File path: src/kvstore/collectives/src/mpi_message.proto
 ##########
 @@ -0,0 +1,67 @@
+syntax = "proto3";
+
+package mxnet.kvstore;
+
+// We would like to just use DataType here, but since this
+// is a contrib package, linking directly to MXNet protos seems to be
+// impossible. Doing so compiles, but fails with a cryptic error at runtime
+// about a pointer that was passed to free() but not created by malloc().
+//
+// Since using the mxnet/core protos seems to cause issues, we use our own,
+// which also has the benefit of supporting only the data types we want to 
support.
+enum MPIDataType {
+    MX_MPI_INVALID_TYPE = 0;
+    MX_MPI_FLOAT32 = 1;
+    MX_MPI_INT32 = 2;
+    MX_MPI_INT64 = 3;
+};
+
+// An MPIRequest is a message sent from a rank greater than zero to the
+// coordinator (rank zero), informing the coordinator of an operation that
+// the rank wants to do and the tensor that it wants to apply the operation to.
+message MPIRequest {
+  enum RequestType {
+    ALLREDUCE = 0;
+    ALLGATHER = 1;
+    BROADCAST = 2;
+  }
+
+  // The request rank is necessary to create a consistent ordering of results,
+  // for example in the allgather where the order of outputs should be sorted
+  // by rank.
+  int32 request_rank = 1;
+  string key_name = 2;
+  RequestType request_type = 3;
+  MPIDataType value_type = 4;
+  int32 root_rank = 5;
+
+  // We use a repeated integer instead of a TensorShapeProto because linking 
directly
 
 Review comment:
   For my understanding what does this do?

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


With regards,
Apache Git Services

Reply via email to