title: Match pseudo random numbers between MT19937 CPU and GPU
body: <p>I am studying the behaviour of <code>CURAND_RNG_PSEUDO_MT19937</code>, specifically in order to match numbers generated by the standard CPU implemetation of Mersenne Twister (<code>std::mt19937</code> or <code>boost::random::mt19937</code>).</p>
  <p>I read in the <a href="https://docs.nvidia.com/cuda/archive/11.1.0/curand/host-api-overview.html#order" rel="nofollow noreferrer">documentation</a> that cuRand MT19937 “has the same parameters as CPU version, but ordering is different […] Output is generated by 8192 independent generators. Each generator generates consecutive subsequence of the original sequence. […] Results are permuted differently than originally to achieve higher performance.”</p>
  <p>Checking the unsigned int output sequences of <code>std::mt19937</code> and cuRand MT19937 with the same seed, only the first number is equal and immediately the two generators diverge.</p>
  <p>Consider that in my CPU environment, I have a distributed computation that instantiate <code>n</code> <code>std::mt19937</code> with incremental seeds (<code>s+1</code>, <code>s+2</code>, etc.). Do you know if there is a way to modify the cuRand MT19937 generators in order to match my workflow?</p>
  <p>Thanks</p>