Follow up on my previous PR on supporting the new target system with target_host
folded into the target object. I have submitted a new PR on review [Target] Add support for target object with host field compatible with previous api by zxybazh · Pull Request #7534 · apache/tvm · GitHub this week to fully support all functions previously using target and target_host as argument with backward compatibility. This PR’s scope is to cover everything before we finally deprecate target_host
. New tutorial code and test code are also updated in the PR for recommended practice. Please review the code the let me know any advice on the PR, thanks!
Currently, I did not remove all usage of target_host
as a variable mainly because of two reasons:
- For heterogeneous targets, there could be multiple targets maintained in a dict, which makes a single
target_host
more convenient in related context. If we decide to move on in the deprecation, we might need to consider refactor the code for heterogenoues target. - It takes more time to replace all the occurance, and part of the code would be refactored, e.g., the structure of
SearchTaskNode
and the signature oftarget_host
related functions, once we decide to deprecatetarget_host
. I want to leave the work later if we decide on deprecation and be more consistent in design at that time.
In the meantime, for next step, as @comaniac pointed out in his comment [Target] Add support for target object with host field compatible with previous api by zxybazh · Pull Request #7534 · apache/tvm · GitHub we have different options in target_host deprecation (also see @junrushao [Target] Add target host field for target specification by zxybazh · Pull Request #7462 · apache/tvm · GitHub).
- D0. Simply remove the
target_host
argument if that API is seldomly used. - D1. Keep the
target_host
argument, but log out a warning saying this is not effective anymore and will be deprecated. We can move on deprecation in the next release cycle.
I think both ways could work. Would like to see how does everyone think and which way could be better.