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/03 18:53:18 UTC

[GitHub] [incubator-mxnet] ptrendx opened a new pull request #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp

ptrendx opened a new pull request #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp
URL: https://github.com/apache/incubator-mxnet/pull/17966
 
 
   ## Description ##
   When doing `autograd.backward` on a `HybridBlock` with constant parameters, arrays for gradient outputs for those parameters are not provided by the frontend (since they are not needed) and instead they are temporarily allocated each time backward is executed. 
   However, `CachedOp` hybridized with `static_shape=True` checks for all input/output arrays to match the saved ones. The fact that the output for those not-real gradients is temporarily generated each time might result in a mismatch and regeneration of engine ops during each iteration, which introduces big gaps in the execution.
   Since the `arrays` in the CachedOp are saved in the state, it is actually OK to reuse the already saved `NDArray` even if there is a mismatch, as long as the `kNullOp` req is set, which this PR does.
   
   @zheng-da @eric-haibin-lin 
   
   ## 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] To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ## Comments ##
   - Since the effect is purely performance, I'm not sure how to test 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] eric-haibin-lin merged pull request #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp

Posted by GitBox <gi...@apache.org>.
eric-haibin-lin merged pull request #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp
URL: https://github.com/apache/incubator-mxnet/pull/17966
 
 
   

----------------------------------------------------------------
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 #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on issue #17966: Omit kNullOp req when comparing changed NDArrays in static_shape=True backward of CachedOp
URL: https://github.com/apache/incubator-mxnet/pull/17966#issuecomment-608604150
 
 
   Hey @ptrendx , 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**: [miscellaneous, unix-cpu, centos-cpu, centos-gpu, sanity, clang, edge, windows-gpu, windows-cpu, website, unix-gpu]
   *** 
   _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