DPCT1033#

Message#

Migrated code uses a basic Sobol generator. Initialize oneapi::mkl::rng::sobol generator with user-defined direction numbers to use it as Scrambled Sobol generator.

Detailed Help#

IntelĀ® oneAPI Math Kernel Library (oneMKL) RNG currently does not support Scrambled Sobol generator by default.

Migrated code uses a basic Sobol generator.

Suggestions to Fix#

Set user-defined direction numbers to the basic Sobol generator and use it as Scrambled Sobol generator.

See the Random Number Generators topic for more information.

For example, this original CUDA* code:

1void foo() {
2  ...
3  curandGenerator_t rng;
4  curandCreateGenerator(&rng, CURAND_RNG_QUASI_SCRAMBLED_SOBOL32);
5  curandSetQuasiRandomGeneratorDimensions(rng, 1234);
6}

results in the following migrated SYCL* code:

 1void foo() {
 2  ...
 3  dpct::rng::host_rng_ptr rng;
 4  /*
 5  DPCT1033:0: Migrated code uses a basic Sobol generator. Initialize
 6  oneapi::mkl::rng::sobol generator with user-defined direction numbers to use
 7  it as Scrambled Sobol generator.
 8  */
 9  rng = dpct::rng::create_host_rng(dpct::rng::random_engine_type::sobol);
10  rng->set_dimensions(1234);
11}

which is rewritten to:

1void foo() {
2  ...
3  dpct::rng::host_rng_ptr rng;
4  rng = dpct::rng::create_host_rng(dpct::rng::random_engine_type::sobol);
5  rng->set_direction_numbers(direction_numbers /*Use user-defined direction numbers*/);
6}