tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[TVMScript] Text underlining in DocPrinter based on Doc's source_paths

Open gbonik opened this issue 3 years ago • 1 comments

This adds an ability to print a "diagnostic marker" based on a given ObjectPath. For example, say we are printing a fragment of TIR like

for i in T.serial(10):
    a[i] = 5

and we would like bring the user's attention to the bound of the loop:

for i in T.serial(10):
                  ^^
    a[i] = 5

In this case we would give the doc printer an object path that represents this loop bound, i.e. something like path_to_underline=ObjectPath.root().attr("extent")

Tracking issue: https://github.com/apache/tvm/issues/11912 cc @yelite @junrushao1994

gbonik avatar Aug 09 '22 00:08 gbonik

Let's fix the lint and get it in :-)

junrushao avatar Aug 10 '22 06:08 junrushao

Thanks for the PR! It's merged :-)

junrushao avatar Aug 11 '22 05:08 junrushao