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/19 22:56:18 UTC

[GitHub] DickJC123 opened a new pull request #11338: [MXNET-11241] Avoid use of troublesome cudnnFind() results when grad_req='add'

DickJC123 opened a new pull request #11338: [MXNET-11241] Avoid use of troublesome cudnnFind() results when grad_req='add'
URL: https://github.com/apache/incubator-mxnet/pull/11338
 
 
   ## Description ##
   The problem of issue #11241 arises because cudnnFind() measures convolution algorithm runtimes with an assumed "output blending parameter" beta of 0.  However, algorithms may have specialized kernels for the beta==0 case, different and faster than the generalized beta kernels.  Should the generalized kernels have issues with the problem size different than the beta==0 kernels, then the algos returned by cudnnFind() might fail when invoked with beta==1 (as it is when the convolution op grad_req='add' argument is present).
   
   The demonstrated problem area involves a large 'c' value of 64K, where for the backprop-to-filter kernel only algo 1 handles the beta==1 case.  CudnnFind() was shown to occasionally return algos 0 or 3 as fastest, and both of these return error 8 "execution failed" when run.
   
   The fix is based on the observation that cudnnGet() returns algo 1 for the backprop-to-filter kernel for the troublesome problem sizes.  Thus,  the fix is to avoid cudnnFind() when grad_req='add' and force use of cudnnGet() instead.  The fix maintains the effectiveness of the caching of algo lookups and convolution op instances, so neither cudnnFind() nor cudnnGet() is called repeatedly.  Deconvolution was similarly updated with this fix.
   
   ## Checklist ##
   ### Essentials ###
   Please feel free to remove inapplicable items for your PR.
   - [X ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)
   - [X ] Changes are complete (i.e. I finished coding on this PR) [1st commit includes test, 2nd the fix]
   - [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 http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
   - [X ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   

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