rondogency commented on a change in pull request #17762: Custom Operator Random 
Number Generator Support
URL: https://github.com/apache/incubator-mxnet/pull/17762#discussion_r399935679
 
 

 ##########
 File path: src/c_api/c_api.cc
 ##########
 @@ -248,11 +250,21 @@ void CustomFComputeDispatcher(const std::string op_name,
   // get actual cudaStream_t out of mxnet gpu stream and pass to lib_api.h
   void *cuda_stream = nullptr;
 #if MXNET_USE_CUDA
-  if (inputs[0].ctx().dev_mask() == Context::kGPU) {
+  if (inputs.size() > 0 && inputs[0].ctx().dev_mask() == Context::kGPU) {
 
 Review comment:
   I think we just check for output

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to