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/05/14 04:57:29 UTC

[GitHub] [tvm] FrozenGene commented on a change in pull request #8041: [Relay][PRNG] Add uniform distribution generator wrt threefry PRNG

FrozenGene commented on a change in pull request #8041:
URL: https://github.com/apache/tvm/pull/8041#discussion_r632280793



##########
File path: tests/python/topi/python/test_topi_prng.py
##########
@@ -43,6 +43,23 @@ def threefry_generate(target, dev, gen, size):
     return out_gen.asnumpy(), rands.asnumpy()
 
 
+def uniform(target, dev, gen, low, high, size, dtype):
+    gen_placeholder = tvm.te.placeholder(gen.shape, name="gen", dtype="uint64")
+    low_placeholder = tvm.te.placeholder(low.shape, name="low", dtype=dtype)
+    high_placeholder = tvm.te.placeholder(high.shape, name="high", dtype=dtype)
+    print(low_placeholder)
+    print(high_placeholder)
+    out_placeholder = tvm.topi.random.uniform(
+        gen_placeholder, low_placeholder, high_placeholder, size, dtype
+    )
+    print(out_placeholder)

Review comment:
       ditto

##########
File path: tests/python/topi/python/test_topi_prng.py
##########
@@ -43,6 +43,23 @@ def threefry_generate(target, dev, gen, size):
     return out_gen.asnumpy(), rands.asnumpy()
 
 
+def uniform(target, dev, gen, low, high, size, dtype):
+    gen_placeholder = tvm.te.placeholder(gen.shape, name="gen", dtype="uint64")
+    low_placeholder = tvm.te.placeholder(low.shape, name="low", dtype=dtype)
+    high_placeholder = tvm.te.placeholder(high.shape, name="high", dtype=dtype)
+    print(low_placeholder)
+    print(high_placeholder)

Review comment:
       remove it




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