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/09/22 06:38:04 UTC

[GitHub] [tvm] wangxiang2713 opened a new pull request #9071: Speed up converting from numpy to C pointer

wangxiang2713 opened a new pull request #9071:
URL: https://github.com/apache/tvm/pull/9071


   Hi, i just run a tensorflow model with TVM. My model has 317 inputs so i find create NDArray inputs for model is time consuming. 
   ```
   data = source_array.ctypes.data_as(ctypes.c_void_p)
   ```
   is used in funstion copyfrom when create NDArray, and i find use 
   ```
   data = ctypes.cast(source_array.__array_interface__['data'][0], ctypes.c_void_p)
   ```
   instead will save 0.35 ms for my model.
   
   I am not sure whether this modification is reasonable.


-- 
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: commits-unsubscribe@tvm.apache.org

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



[GitHub] [tvm] wangxiang2713 closed pull request #9071: Speed up converting from numpy to C pointer

Posted by GitBox <gi...@apache.org>.
wangxiang2713 closed pull request #9071:
URL: https://github.com/apache/tvm/pull/9071


   


-- 
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: commits-unsubscribe@tvm.apache.org

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