You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/29 18:02:37 UTC

[GitHub] szha commented on a change in pull request #11429: Improve sparse pull performance for gluon trainer

szha commented on a change in pull request #11429: Improve sparse pull performance for gluon trainer
URL: https://github.com/apache/incubator-mxnet/pull/11429#discussion_r199237863
 
 

 ##########
 File path: python/mxnet/gluon/trainer.py
 ##########
 @@ -169,9 +190,9 @@ def _init_kvstore(self):
         if kvstore:
             if self._compression_params:
                 kvstore.set_gradient_compression(self._compression_params)
-            # kv.pull(row_sparse_grad) is not supported
-            if 'dist' in kvstore.type and not self._contains_sparse:
-                update_on_kvstore = False
+            if 'dist' in kvstore.type:
+                # kv.pull(row_sparse_grad) is not supported for dist kvstore
+                update_on_kvstore = self._contains_sparse_weight or self._contains_sparse_grad
 
 Review comment:
   from the comment I'm guessing you meant `not self._contains_sparse_weight and not self._contains_sparse_grad`

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services