-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Relay][TF] Keep node name in span #6885
Conversation
Ah...I think it is a nice feature and should enable it in all frontend, this is good for profiling (like we use debug graph runtime to see every layer's output). But I remember @tqchen said we will have another WIP feature to do this? |
I now think that span is the right way to do it, as long as we don't rely the information in passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think this is also what @jroesch was adding.
Perhaps we could also do similar things for other frontends |
@lixiaoquan I think we can do this, but I am not sure if overloading the source spans are the right way? perhaps we can sub-class or modify spans for handling whether they point into a source file or into an imported graph? I think it might be good to clarify this design. |
@jroesch I agree with you. It looks like a makeshift to use SourceName to store node name, I did this because it introduced very little change. I think we can add a |
With this PR, it is easy to trace a relay CallNode to its source in an imported model. It looks like:
I'm not sure whether it is the correct to use span.SourceName to store node name, but
line
,column
doesn't make sense for an imported model.@jroesch @junrushao1994 @zhiics Could you please help to review? Thanks