Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.
This repository was archived by the owner on May 22, 2023. It is now read-only.

[Bug] Some Printer Bugs #102

Open
Open
@Hzfengsy

Description

@Hzfengsy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions