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 2019/11/20 18:46:17 UTC

[GitHub] [incubator-tvm] gussmith23 opened a new issue #4387: PackedFunc usage in generated code should be thread-safe

gussmith23 opened a new issue #4387: PackedFunc usage in generated code should be thread-safe
URL: https://github.com/apache/incubator-tvm/issues/4387
 
 
   See the discussion at https://discuss.tvm.ai/t/tvm-deadlocking-when-calling-python-packedfunc-from-generated-code/4657.
   
   In the custom datatypes framework I'm building, one feature I'd love to incorporate is the ability to implement datatype operations purely in Python. The way I've currently implemented this takes in a Python function implementing a datatype operator (e.g. `my_custom_dtype_add`), wraps it in a PackedFunc, and then, at codegen, when TVM sees an add with the custom type, it inserts a `tvm_call_packed_lowered` intrinsic calling the PackedFunc.
   
   The above discuss thread describes my experimentation with this -- it works, if I run TVM single-threaded. Tianqi suspects that the problemĀ is that calls to PackedFuncs in generated code are not thread-safe, due to how they handle argument and return allocation.
   
   This issue is meant to open the discussion on making generated PackedFunc calls thread-safe. I'm sure this has been discussed before -- please link previous discussions and conclusions!

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


With regards,
Apache Git Services