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/01/25 03:39:26 UTC

[GitHub] DickJC123 opened a new pull request #9560: Expand gpu-kernel-launch synchronous error checking.

DickJC123 opened a new pull request #9560: Expand gpu-kernel-launch synchronous error checking.
URL: https://github.com/apache/incubator-mxnet/pull/9560
 
 
   Background: @zhreshold and @szha discovered that if MXNet were built without a suitable kernel binary or PTX for the GPU in the system, MXNet might produce incorrect results, rather than print an error message and exit.  The problem is that the "no kernel for device" error is synchronous to the kernel launch, and so needs to be identified by a cudaPeekAtLastError() or cudaGetLastError() call executed by the CPU thread launching the kernel.  This is best done right after the triple-chevron kernel-launch statement, and mshadow and much of MXNet already perform this check through the MSHADOW_CUDA_POST_KERNEL_CHECK() macro.
   
   This PR expands use of MSHADOW_CUDA_POST_KERNEL_CHECK() to cover any triple-chevron kernel launches where it is missing, e.g. the generic Kernel::Launch and Kernel::LaunchEx routines.  I have verified the original scenario of an improperly built MXNet now exits with an error message.  I did not add a CI test, as this would have required creating a new test-only operator and hooking it to a kernel that fails at launch.
   
   ## Checklist ##
   ### Essentials ###
   - [ ] Passed code style checking (`make lint`)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] 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)
   - [ ] 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
   - [ ] 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