junrushao opened a new pull request, #448:
URL: https://github.com/apache/tvm-ffi/pull/448

   Add `__init__` to the Cython `Function` class so users can write:
   
       fadd = tvm_ffi.Function(add)
   
   instead of going through `tvm_ffi.convert_to_tvm_func`. The constructor:
   - Validates that the argument is callable
   - Copies the handle (with incref) if the input is already a Function
   - Otherwise converts via `_convert_to_ffi_func_handle`
   
   Also adds the corresponding type stub in `core.pyi` and a test in 
`test_function.py`.
   
   Re-lands the original change reverted in #406.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to