tqchen commented on issue #16627:
URL: https://github.com/apache/tvm/issues/16627#issuecomment-2013657524

   ```python
   import tvm
   import numpy as np
   from tvm.script import tir as T
   
   
   @tvm.script.ir_module
   class MyModule:
       @T.prim_func
       def vector_copy(A: T.Buffer((4,), "int8x4"),
                       B: T.Buffer((4,), "int8x4")):
           T.func_attr({"global_symbol": "vector_copy", "tir.noalias": True})
           for i in T.grid(4):
               with T.block("B"):
                   vi = T.axis.spatial(128, i)
                   B[vi] = A[vi]
   
   def main():
   
       mod = tvm.build(MyModule)
       a_np = np.arange(16).astype("int8").reshape((4, 4))
       a = tvm.nd.empty((4,), dtype="int8x4").copyfrom(a_np)
       b = tvm.nd.empty((4,), dtype="int8x4")
       mod["vector_copy"](a, b)
       print(b.numpy())
   
   
   main()
   ```


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