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

 ##########
 File path: src/c_api/c_api.cc
 ##########
 @@ -177,10 +177,39 @@ void CustomFComputeDispatcher(const std::string op_name,
     return static_cast<void*>((*gpualloc)(size));
   };
 
+  // MXNet random number generator lambda to be invoked by custom library
+  // custom library will use gpu rng whenever possible
+  auto rng_caller = [&](RandGenType rand_type, int seed) {
+#if MXNET_USE_CUDA
 
 Review comment:
   I dont think we should have a default, user should be explicit which one 
they want to use. otherwise we introduce possible confusion

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