azai91 commented on a change in pull request #12374: Fix/public internal header
URL: https://github.com/apache/incubator-mxnet/pull/12374#discussion_r216816806
 
 

 ##########
 File path: include/mxnet/random_generator.h
 ##########
 @@ -150,14 +149,9 @@ class RandGenerator<gpu, DType> {
     curandStatePhilox4_32_10_t state_;
   };  // class RandGenerator<gpu, DType>::Impl
 
-  static void AllocState(RandGenerator<gpu, DType> *inst) {
-    CUDA_CALL(cudaMalloc(&inst->states_,
-                         kNumRandomStates * 
sizeof(curandStatePhilox4_32_10_t)));
-  }
+  static void AllocState(RandGenerator<gpu, DType> *inst);
 
 Review comment:
   it seems that they way we are using the random_generator, we expect the 
developer to be able to access the internal Impl class 
(https://github.com/azai91/incubator-mxnet/blob/6f7254c91709904a9fb6290f1998fcf2da818d0e/src/operator/random/unique_sample_op.h#L118).
 
   
   the class is is public as well. I may be interpretting the developers 
intentions incorrectly though.

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


With regards,
Apache Git Services

Reply via email to