发布

  • [TVMScript][Fix] Correct round-trip of explicit root block (#12673)

    frostbyte_neo 发布于 2022-09-21 13:04:53 +00:00

    • [TVMScript][Fix] Correct round-trip of explicit root block

    Prior to this commit, when converting TIR to TVMScript, the root
    tir::Block is typically hidden. When parsing, however,
    tvm::tir::ScriptComplete will wrap the function body in a root block
    if the primfunc if the contains at least one block and does not
    already have a root block. As a result, if the root block is the only
    block present, it would be stripped by a round-trip.

    This commit tightens the condition for hiding the root tir::Block
    when converting to TVMScript, so that it is printed in cases where
    the autocompleter would reinsert it when parsing.

    下载附件