You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 22, 2023. It is now read-only.
TVMScript is very useful to create Relax IRModule, especially for unit tests. However, since Relax does not have its own operator set yet, creating an IRModule with several well known operators is a hassle using TVMScript.
In such cases, one would have to generate the IRModule either using
generate the IRModule using BlockBuilder, then print TVMScript and copy it.
In both cases, we use the BlockBuilder because its emit_te interface can generate TIR implementations corresponding to TE compute.
I propose, we introduce emit_te sugar in TVMScript as well which would internally find the relevant op strategy and generate the corresponding TIR primfunc. The signature could look something like below.
lv = R.emit_te(<te_compute>, input_arg0, input_arg1, ..., attrs=<dictionary of attributes>)
example: lv = R.emit_te(topi.add, x, y, attrs={'my_op_kind': 'addition operation', ...})
This will allow us to replace example test cases below with TVMScript which is easier to read.
TVMScript is very useful to create Relax IRModule, especially for unit tests. However, since Relax does not have its own operator set yet, creating an IRModule with several well known operators is a hassle using TVMScript.
In such cases, one would have to generate the IRModule either using
In both cases, we use the BlockBuilder because its emit_te interface can generate TIR implementations corresponding to TE compute.
I propose, we introduce
emit_te
sugar in TVMScript as well which would internally find the relevant op strategy and generate the corresponding TIR primfunc. The signature could look something like below.lv = R.emit_te(<te_compute>, input_arg0, input_arg1, ..., attrs=<dictionary of attributes>)
example:
lv = R.emit_te(topi.add, x, y, attrs={'my_op_kind': 'addition operation', ...})
This will allow us to replace example test cases below with TVMScript which is easier to read.
using BlockBuilder
using TVMScript with emit_te sugar.
The text was updated successfully, but these errors were encountered: