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/10/12 20:23:33 UTC

[GitHub] [tvm-rfcs] areusch commented on pull request #34: Wiring up the PrimFunc resource_handle

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


   @mbs-octoml @electriclillies and I discussed this at length and we followed up with @Mousius offline as well. While it is tempting to re-use `resource_handle` to pass a `this` context `void*` through to Device API impls, it seems like it ultimately amounts to carving out an exception case where, when targeting the C Runtime using the AOT Executor, TIR gets to control `resource_handle`; in any other case, it's either impossible to or requires significant runtime changes. A concern is that driver authors would ideally like a predictable programming model. Going the `resource_handle` route means that the programming model is more complex--two different ways to pass `device_api_context` depending on the targeted runtime and executor. 
   
   Given this, it seems like the best route is just to add it to the arguments list. @Mousius is going to try this and see if we run in to any other issues. According to @Mousius , past attempts to fully encapsulate the `device_api_context` parameter in tir::Call have maybe ran into issues with ArgBinder so we're going to see if this works and go from there.


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