Skip to content

Native RNGs do not pass SmallCrush #803

@maleadt

Description

@maleadt

Both GPUArrays' and CUDA's native RNGs do not support RNGTest's SmallCrush:

julia> rng = RNGTest.wrap(CUDA.gpuarrays_rng(), UInt32)'

julia> RNGTest.smallcrushTestU01(rng)

========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        
 Number of statistics:  15
 Total CPU time:   00:00:05.25
 The following tests gave p-values outside [0.001, 0.9990]:
 (eps  means a value < 1.0e-300):
 (eps1 means a value < 1.0e-15):

       Test                          p-value
 ----------------------------------------------
  1  BirthdaySpacings                 eps  
  2  Collision                        eps  
  3  Gap                              eps  
  4  SimpPoker                       7.4e-4
  5  CouponCollector                 4.9e-4
  6  MaxOft                           eps  
  7  WeightDistrib                   1.4e-5
  9  HammingIndep                    1.3e-4
 ----------------------------------------------
 All other tests were passed
julia> rng = RNGTest.wrap(CUDA.RNG(), UInt32);

julia> RNGTest.smallcrushTestU01(rng)

========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        
 Number of statistics:  15
 Total CPU time:   00:00:05.21
 The following tests gave p-values outside [0.001, 0.9990]:
 (eps  means a value < 1.0e-300):
 (eps1 means a value < 1.0e-15):

       Test                          p-value
 ----------------------------------------------
  1  BirthdaySpacings                 eps  
  2  Collision                        eps  
  3  Gap                              eps  
  4  SimpPoker                        eps  
  5  CouponCollector                  eps  
  6  MaxOft AD                      1 - eps1
  7  WeightDistrib                    eps  
  8  MatrixRank                       eps  
  9  HammingIndep                     eps  
 10  RandomWalk1 H                   5.0e-5
 ----------------------------------------------
 All other tests were passed

CURAND does, of course:

julia> rng = RNGTest.wrap(CUDA.curand_rng(), UInt32);

julia> RNGTest.smallcrushTestU01(rng)

========= Summary results of SmallCrush =========

 Version:          TestU01 1.2.3
 Generator:        
 Number of statistics:  15
 Total CPU time:   00:00:05.53

 All tests were passed

I'm out of my depth here, so help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions