Lunderberg commented on PR #15855:
URL: https://github.com/apache/tvm/pull/15855#issuecomment-1779338988

   One unrelated question, though.  In your pseudocode, you have the signature 
`def test(x: Object, callback)`, but I wasn't able to pass a callback directly 
into a relax function.  I could define a relax function that takes `callback: 
R.Callable([R.Object], R.Prim('bool'))` as an argument, but it ran into [this 
check](https://github.com/apache/tvm/blob/unity/src/relax/backend/vm/exec_builder.cc#L141)
 when running CodegenVM.  I ended up rewriting it to instead use `R.ExternFunc` 
to find the callback, but that requires global state for a local callback.  Is 
there a way to pass the callback directly to a relax function?


-- 
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-unsubscr...@tvm.apache.org

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

Reply via email to