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_r399045838
 
 

 ##########
 File path: include/mxnet/lib_api.h
 ##########
 @@ -463,6 +466,19 @@ class OpResource {
                    &(sparse->data), &(sparse->indices), &(sparse->indptr));
   }
 
+  /*! \brief get pointer to cpu random number inited and seeded states */
+  /* this global states are located on cpu, of type std::mt19937 */
+  void* get_cpu_rand_states() {
+    return cpu_rand_states;
+  }
+
+  /*! \brief get pointer to gpu random number inited and seeded states */
+  /* this global states are located on gpu, of type curandStatePhilox4_32_10_t 
*/
+  /* note that if you are usign cpu build, then it will return a nullptr */
+  void* get_gpu_rand_states() {
+    return gpu_rand_states;
 
 Review comment:
   is there any reason not to return already casted to 
curandStatePhilox4_32_10_t?
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to