numba-dpex
numba-dpex copied to clipboard
Gaps in RNG function supported by numba_dpex.kernel v/s numba.cuda
Evaluate the RNG feature supported by numba.cuda
and develop a plan on how to include support for similar functionality for numba_dpex.kernel
.
Feature | numba.cuda | numba_dpex |
---|---|---|
New device array initialized for n random number generators | numba.cuda.random.create_xoroshiro128p_states(n, seed, subsequence_start=0, stream=0) | no |
Initialize RNG states on the GPU for parallel generators | numba.cuda.random.init_xoroshiro128p_states(states, seed, subsequence_start=0, stream=0) | no |
Return a float32 in range [0.0, 1.0) and advance states[index] | numba.cuda.random.xoroshiro128p_uniform_float32(states, index) | no |
Return a float64 in range [0.0, 1.0) and advance states[index] | numba.cuda.random.xoroshiro128p_uniform_float64(states, index) | no |
Return a normally distributed float32 and advance states[index] | numba.cuda.random.xoroshiro128p_normal_float32(states, index) | no |
Return a normally distributed float64 and advance states[index] | numba.cuda.random.xoroshiro128p_normal_float64(states, index) | no |
UPDATE: The issue was updated to only capture the missing RNG functionality in numba_dpex.kernel
API.
Could be related:
- https://github.com/IntelPython/numba-dppy/pull/141
@ZzEeKkAa I believe that the missing functionality is more or less implemented by in sklearn-numba-dpex in https://github.com/soda-inria/sklearn-numba-dpex/blob/main/sklearn_numba_dpex/common/random.py. We may be able to close the issue by simply porting over the file to numba-dpex.