CharlieFRuan opened a new pull request, #16722:
URL: https://github.com/apache/tvm/pull/16722

   This PR implements `LinearCongruentialGenerator` in TVMjs, following the C++ 
counterpart in https://github.com/apache/tvm/pull/8642/. The motivation is that 
we want to seed autoregressive generation to make results reproducible, 
supporting the OpenAI field `seed`. The main function is `nextInt()`, which 
generates a number `(0, 2^32 - 1)` non-inclusive.
   
   Subsequently, we change all `Math.random()` in `runtime.ts` to 
`this.rng.randomFloat()`, exposing API `Instance.setSeed()`.
   
   Unit tests are added for `LinearCongruentialGenerator` for testing seed and 
coverage.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to