You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2019/09/06 14:53:28 UTC

[incubator-mxnet] branch master updated: Speed up group executor (#16069)

This is an automated email from the ASF dual-hosted git repository.

marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new e98dbe7  Speed up group executor (#16069)
e98dbe7 is described below

commit e98dbe776201424cff93f87e67ff3bddb87d45e5
Author: Doron Singer <48...@users.noreply.github.com>
AuthorDate: Fri Sep 6 17:53:04 2019 +0300

    Speed up group executor (#16069)
    
    * Speed up group executor
    
    Current implementation is O(n^2), this implementation is O(n)
    
    * Speed up group executor
    
    Current implementation is O(n^2), this implementation is O(n)
    
    * CI
---
 python/mxnet/module/executor_group.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/python/mxnet/module/executor_group.py b/python/mxnet/module/executor_group.py
index 637acce..d47665d 100755
--- a/python/mxnet/module/executor_group.py
+++ b/python/mxnet/module/executor_group.py
@@ -273,9 +273,9 @@ class DataParallelExecutorGroup(object):
         self.data_layouts = None
         self.label_layouts = None
         self.output_names = self.symbol.list_outputs()
-        self.output_layouts = [DataDesc.get_batch_axis(self.symbol[name].attr('__layout__'))
-                               for name in self.output_names]
-        self.num_outputs = len(self.symbol.list_outputs())
+        self.num_outputs = len(self.output_names)
+        self.output_layouts = [DataDesc.get_batch_axis(self.symbol[index].attr('__layout__'))
+                               for index in range(self.num_outputs)]
 
         self.bind_exec(data_shapes, label_shapes, shared_group)