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_r399420491
########## File path: include/mxnet/lib_api.h ########## @@ -426,21 +432,30 @@ typedef void (*sparse_malloc_t)(void*, int, int, int, void**, int64_t**, int64_t #if defined(__NVCC__) typedef cudaStream_t mx_stream_t; + typedef curandStatePhilox4_32_10_t* mx_gpu_rand_pt; #else typedef void* mx_stream_t; + typedef void* mx_gpu_rand_pt; #endif +/*! \brief MXNet initialized random states for each device, used for parallelism */ +/* Each thread should generate random number unique sequence out of different states */ +#define NumCPURandomStates 1024 +#define NumGPURandomStates 32768 Review comment: Can we prefix these with MX_ and use all caps? MX_CPU_RANDOM_STATES MX_GPU_RANDOM_STATES ---------------------------------------------------------------- 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
