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 2020/04/01 02:08:39 UTC

[GitHub] [incubator-mxnet] mk-61 opened a new pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

mk-61 opened a new pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations
URL: https://github.com/apache/incubator-mxnet/pull/17949
 
 
   ## Description ##
   This change makes computation graphs, created in Gluon hybrid mode (CachedOp), tolerate input reordering during graph transformations - specifically, fusions.
   
   @ptrendx 
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [x] Changes are complete (i.e. I finished coding on this PR)
   - [x] All changes have test coverage:
   - Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
   - Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
   - Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
   - [x] Code is well-documented: 
   - For user-facing API changes, API doc string has been updated. 
   - For new C++ functions in header files, their functionalities and arguments are documented. 
   - For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
   - Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [x] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   

----------------------------------------------------------------
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

[GitHub] [incubator-mxnet] mxnet-bot commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-606984537
 
 
   Hey @mk-61 , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [edge, centos-gpu, windows-gpu, website, clang, centos-cpu, windows-cpu, unix-gpu, miscellaneous, sanity, unix-cpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   

----------------------------------------------------------------
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

[GitHub] [incubator-mxnet] mxnet-bot commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-611712729
 
 
   Jenkins CI successfully triggered : [edge, windows-gpu, sanity, windows-cpu, unix-cpu, unix-gpu, miscellaneous, centos-gpu, centos-cpu, clang, website]

----------------------------------------------------------------
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

[GitHub] [incubator-mxnet] mk-61 commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-624215898


   @mxnet-bot run ci [all]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637937801


   None of the jobs entered are supported. 
   Jobs entered by user: [ci/jenkins/mxnet-validation/centos-cpu]
   CI supported Jobs: [centos-cpu, edge, unix-cpu, windows-gpu, sanity, clang, miscellaneous, windows-cpu, unix-gpu, centos-gpu, website]
   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mk-61 commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on issue #17949: Allow input reordering duing Gluon / CachedOp graph transformations
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-611712640
 
 
   @mxnet-bot run ci [all]

----------------------------------------------------------------
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

[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637938015


   Jenkins CI successfully triggered : [centos-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mk-61 commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637937788


    @mxnet-bot run ci [ci/jenkins/mxnet-validation/centos-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mk-61 commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637937991


   @mxnet-bot run ci [centos-cpu]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mk-61 commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637943995


   @mxnet-bot run ci [macosx-x86_64]


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] eric-haibin-lin commented on a change in pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
eric-haibin-lin commented on a change in pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#discussion_r443844947



##########
File path: src/imperative/cached_op.h
##########
@@ -547,6 +558,7 @@ class CachedOp {
       const std::vector<NDArray*>& inputs,
       const std::vector<OpReqType>& reqs,
       const std::vector<NDArray*>& outputs);

Review comment:
       Can we add some comment for this method? 

##########
File path: tests/python/gpu/test_fusion.py
##########
@@ -337,3 +338,36 @@ def test_fusion_reshape_executor():
     out = f.forward(is_train=False, data1=data, data2=data)
     assert out[0].sum().asscalar() == 150
 
+@with_seed()
+def test_input_reorder():
+    class Block(gluon.HybridBlock):
+        def __init__(self, **kwargs):
+            super(Block, self).__init__(**kwargs)
+
+        def hybrid_forward(self, F, x, y, z):
+            s = x * 2

Review comment:
       Would would happen without this fix? Does gluon try to feed inputs in incorrect order and sometimes give wrong result? 




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] eric-haibin-lin merged pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
eric-haibin-lin merged pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949


   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
ptrendx commented on a change in pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#discussion_r443854594



##########
File path: tests/python/gpu/test_fusion.py
##########
@@ -337,3 +338,36 @@ def test_fusion_reshape_executor():
     out = f.forward(is_train=False, data1=data, data2=data)
     assert out[0].sum().asscalar() == 150
 
+@with_seed()
+def test_input_reorder():
+    class Block(gluon.HybridBlock):
+        def __init__(self, **kwargs):
+            super(Block, self).__init__(**kwargs)
+
+        def hybrid_forward(self, F, x, y, z):
+            s = x * 2

Review comment:
       Without this fix fusion would generate a graph with different inputs order which would be caught and the fusion would be disabled.




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637944017


   None of the jobs entered are supported. 
   Jobs entered by user: [macosx-x86_64]
   CI supported Jobs: [clang, centos-gpu, edge, unix-gpu, sanity, windows-cpu, miscellaneous, website, windows-gpu, unix-cpu, centos-cpu]
   


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] szha commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
szha commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-637895610


   cc @eric-haibin-lin 


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mk-61 commented on a change in pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mk-61 commented on a change in pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#discussion_r443916736



##########
File path: src/imperative/cached_op.h
##########
@@ -547,6 +558,7 @@ class CachedOp {
       const std::vector<NDArray*>& inputs,
       const std::vector<OpReqType>& reqs,
       const std::vector<NDArray*>& outputs);

Review comment:
       Which method are you referring to?  Sorry, it's not obvious from the quoted code fragment (probably because I messed commit history a bit? - now fixed).




----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #17949: Allow input reordering duing Gluon / CachedOp graph transformations

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #17949:
URL: https://github.com/apache/incubator-mxnet/pull/17949#issuecomment-624216009


   Jenkins CI successfully triggered : [clang, unix-gpu, miscellaneous, website, centos-gpu, windows-gpu, windows-cpu, centos-cpu, unix-cpu, edge, sanity]


----------------------------------------------------------------
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