TVM current has two different hybrid scripts:
tvm.hybrid.script. This leads to confusion as both scripts are similar but share different use cases and properties. This is especially confusing for new users as hybrid script can refer to either of these names. (I have had discussions with people where we were both referring to different hybrid scripts.)
I propose we rename
tvm.hybrid.script as it is going to be used a lot in the future and is newer than
te.hybrid.script. I have a couple of possible new names.
- tir.script: this name reflects the current use of
tvm.hybrid.scriptas a sugar for TIR.
- tvm.script: this is a similar name to torch’s torchscript. Although
tvm.hybrid.scriptsupports only TIR right now, in the future we would like it to support relay. This generic name covers this use case.
- tvm.script.tir and tvm.script.relay: like tvm.script, but we make the difference between script supporting TIR and script supporting Relay. In the future this may cause an issue if we have a unified script for TIR and Relay (which is a goal of
Personally I am leaning towards tvm.script as I think it will make the most sense to new users and communicates the end goals we have.
Which options does everyone like? If you don’t like any of these, could you propose a new name?
Name changing is churn, and can make old docs/discuss posts out of date. But right now there is not that much usage of
tvm.hybrid.script. Renaming it earlier instead of later will cause fewer issues. We can also mark the
tvm.hybrid.script identifier as deprecated to allow users time to switch over to the new naming scheme.
tvm.hybrid.script PR: [RFC] Hybrid Script Support for TIR