You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/01/27 13:49:43 UTC

[GitHub] [tvm] tqchen commented on a change in pull request #7287: [PRNG] Add check to PRNG to make sure that unsigned integer arithmetic is wrapping

tqchen commented on a change in pull request #7287:
URL: https://github.com/apache/tvm/pull/7287#discussion_r565321690



##########
File path: python/tvm/topi/random/kernel.py
##########
@@ -234,6 +242,18 @@ def gen_ir(gen_ptr, out_gen_ptr, out_array_ptr):
         out_gen = irb.buffer_ptr(out_gen_ptr)
         out_array = irb.buffer_ptr(out_array_ptr)
 
+        # Check that unsigned arithmetic wraps, as it is required to implement threefry correctly.
+        irb.emit(

Review comment:
       The behavior can be backend dependent, I think right now the assert will be omitted




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org