Laurawly commented on a change in pull request #8915: NVLink communication 
pattern updated 
URL: https://github.com/apache/incubator-mxnet/pull/8915#discussion_r156526811
 
 

 ##########
 File path: src/kvstore/comm.h
 ##########
 @@ -670,31 +715,75 @@ class CommDevice : public Comm {
   using KeyAttrs = std::tuple<int, TShape, int>;
   // try to allocate buff on device evenly
   void InitMergeBuffer(const std::vector<Context>& devs) {
-    std::sort(sorted_key_attrs_.begin(), sorted_key_attrs_.end(), [](
-              const KeyAttrs& a, const KeyAttrs& b) {
-      return std::get<1>(a).Size() > std::get<1>(b).Size();
-    });
-
-    std::unordered_map<int, std::pair<Context, size_t>> ctx_info;
-    for (auto d : devs) {
-      ctx_info[d.dev_id] = std::make_pair(d, 0);
+    std::sort(sorted_key_attrs_.begin(), sorted_key_attrs_.end(),
+              [](const KeyAttrs& a, const KeyAttrs& b) {
+                return std::get<1>(a).Size() > std::get<1>(b).Size();
+              });
+
+    std::vector<Context> g1, g2;
 
 Review comment:
   So g represents group here. It means I separate the GPU cards into two 
communication groups.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to