tqchen opened a new pull request #4623: [REFACTOR] Automatically deduce ftype 
signature in Registry.set_body_typed
URL: https://github.com/apache/incubator-tvm/pull/4623
 
 
   Previously we support a limited case of function type deduction and in many 
places
   we have to supply the type twice during set_body_typed (one in the template 
parameter, another in the lambda signature).
   
   This PR improves the deduce function by enablng automatic function signature 
deduction.
   
   ```
   TVM_REGISTER_GLOBAL("sub")
   .set_body_typed([](int x, int y) -> int { return x - y; });
   ```
   
   Unfortunately, because of template conflict, we can not support the original 
case
   where both type signature and lambda are supplied through set_body_typed.
   
   This PR refactors the existing regsitration to the new style.
   
   Thanks for contributing to TVM!   Please refer to guideline 
https://docs.tvm.ai/contribute/ for useful information and tips. After the pull 
request is submitted, please request code reviews from 
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
 by @ them in the pull request thread.
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to