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/03/17 07:22:43 UTC

[GitHub] [tvm] XIAO-XIA opened a new issue #7682: [BUG][Threefry] Seg fault when running threefry_generate with some out_shape

XIAO-XIA opened a new issue #7682:
URL: https://github.com/apache/tvm/issues/7682


   Segmentation fault occurs when the `out_shape` of `threefry_generate` setted to some cases.
   
   ### To Reproduce
   #### environment:
   Ubuntu 18.04, llvm version 8.0.1
   #### script:
   ```python
   import tvm
   import tvm.relay
   import tvm.testing
   import tvm.topi
   import numpy as np
   
   
   def threefry_generate(target, ctx, gen, size):
       gen_placeholder = tvm.te.placeholder(gen.shape, name="gen", dtype="uint64")
       left_placeholder, right_placeholder = tvm.topi.random.threefry_generate(gen_placeholder, size)
       s = tvm.topi.generic.schedule_extern([left_placeholder, right_placeholder])
       f = tvm.build(s, [gen_placeholder, left_placeholder, right_placeholder])
       out_gen = tvm.nd.array(np.zeros(gen.shape, dtype="uint64"))
       rands = tvm.nd.array(np.zeros(size, dtype="uint64"))
       f(tvm.nd.array(gen), out_gen, rands)
       return out_gen.asnumpy(), rands.asnumpy()
   
   
   @tvm.testing.parametrize_targets
   def test_threefry_generate(target, ctx):
       gen = tvm.relay.random.threefry_key(0).data.asnumpy()
       shape = (1, 3, 224, 224)
   
       a, rands = threefry_generate(target, ctx, gen, shape)
   
   
   if __name__ == "__main__":
       test_threefry_generate(tvm.target.Target("llvm"), tvm.context("cpu"))
   
   ```
   #### error outputs:
   ```
   malloc(): memory corruption
   Aborted (core dumped)
   ```
   #### error cases:
   `out_shape = (1, 3, 224, 224), (1, 3, 32, 32), (1, 3, 16, 16)`
   


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



[GitHub] [tvm] tqchen commented on issue #7682: [BUG][Threefry] Seg fault when running threefry_generate with some out_shape

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7682:
URL: https://github.com/apache/tvm/issues/7682#issuecomment-802861598


   cc @tkonolige 


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



[GitHub] [tvm] tqchen commented on issue #7682: [BUG][Threefry] Seg fault when running threefry_generate with some out_shape

Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #7682:
URL: https://github.com/apache/tvm/issues/7682#issuecomment-802000754


   cc @tkonolige 


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



[GitHub] [tvm] MarisaKirisame closed issue #7682: [BUG][Threefry] Seg fault when running threefry_generate with some out_shape

Posted by GitBox <gi...@apache.org>.
MarisaKirisame closed issue #7682:
URL: https://github.com/apache/tvm/issues/7682


   


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



[GitHub] [tvm] tqchen removed a comment on issue #7682: [BUG][Threefry] Seg fault when running threefry_generate with some out_shape

Posted by GitBox <gi...@apache.org>.
tqchen removed a comment on issue #7682:
URL: https://github.com/apache/tvm/issues/7682#issuecomment-802000754


   cc @tkonolige 


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