relax
relax copied to clipboard
[Bug] Some Printer Bugs
In the relax script, the vars with the same name usually are the same var. However, there are two cases that break the rule.
B1 The binding var and function output
@R.function
def func(...):
with R.dataflow():
lv = ...
gv = ...
R.output(gv)
return gv
In this case, the gv in gv = ... and the one in return gv can be different. Although it is because I generate the wrong function, the printer at least should distinguish these two vars.
B2 The global var in the module and in the call
@T.prim_func
def func_name():
...
@R.function
def main():
gv = call_tir(func_name, ...)
The GlobalVar func_name in the gv = call_tir(func_name, ...) and that in the IRModule can be the different GlobalVars
I'm not sure if there are other cases that cause similar problems, but it's important to print vars with unique names for both debugging and parsing.
@Hzfengsy can we check the status of this issue?