areusch commented on pull request #51:
URL: https://github.com/apache/tvm-rfcs/pull/51#issuecomment-1011383438


   @cyx-6 thanks for raising this formal RFC. i chatted with @junrushao1994 and 
he reminded me that for PackedFunc registered directly with the C++ runtime, 
there is a fast path in calling them from C++ that avoid re-encoding the 
arguments into the documented PackedFunc C ABI. using this fast path in the 
context of a single project makes sense; however, as you point out here in 
"Unresolved questions," it also means that we may enshrine a de-facto ABI 
between TVM and other projects which is considerably more complex. 
   
   i'm okay with creating this ABI if it provides a clear benefit over the 
already-defined one. if it doesn't, i would prefer that we do something 
different, such as extracting `packed_func.h` into a separate e.g. `dlpack` 
library and allow you to use the C++ PackedFunc wrappers in your code directly 
(and call into TVM code via the C PackedFunc ABI). 
   
   it would be great to motivate creating this second ABI with some details 
about why you can't use the already-defined PackedFunc ABI. performance is a 
perfectly-good reason, but the RFC says nothing about that. would you mind 
adding this detail so it is clear why we are doing this? i don't want to create 
a precedent of going around the PackedFunc ABI since it is presently so 
universal.


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