You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "srkreddy1238 (via GitHub)" <gi...@apache.org> on 2023/02/16 15:40:29 UTC

[GitHub] [tvm] srkreddy1238 commented on pull request #14010: [TVMC][HOOKS] Target specific pre and post processing hooks

srkreddy1238 commented on PR #14010:
URL: https://github.com/apache/tvm/pull/14010#issuecomment-1433288730

   > @srkreddy1238 is there a reason you're not doing this via something like `RelayToTIR` or similar? it seems you could create a `Target` hook which would do this whenever it encounters specific parameters rather than having to manually add it to the `tvmc` command line?
   
   
   @Mousius thanks for the review.
   
   Initially I thought of this approach where I can create an external codegen and extend the ```REGISTERED_CODEGEN``` as shown below. https://github.com/apache/tvm/blob/e7ad4bc0717537807b24a27f8f9c75586b1ee047/python/tvm/driver/tvmc/composite_target.py#L50
   This way tvmc calls the pass_pipeline and we can do what ever we want over the module.
   
   These hooks are essentially small personalization over existing transforms. Like in this example we tried to customize the Mixed Precision pass for Adreno. Essentially we are helping developers with these simple reusable utilities. These hooks are optional features on the existing target and they may grow over time. Creating multiple targets for each such feature results in multiple similar targets definitions.
   
   I thought hooks may be a better approach to keep them away from the existing real external codegens.
   
   What do you think ?


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