Skip to content

Conversation

@matthewfl
Copy link
Contributor

@matthewfl matthewfl commented Oct 21, 2025

This PR fixes the way that layer names are set for TensorRT.

Previously there was a bug in the getUniqueName function that caused it to generate names like name_0_1_2_3_4_5_6_7 instead of name_7. This was not a problem upstream.

Also fixed the way that call sites are translated to layer names. Previous if a Location tracked the entire stack trace (function a calls b calls c calls d ), then the name would be set as a:LINE_NUMBER. Now, the layer name is set to b:LINE -> c:LINE -> d:LINE to provide enough information to identify where an layer comes from.

Copy link
Collaborator

@shelkesagar29 shelkesagar29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@shelkesagar29
Copy link
Collaborator

shelkesagar29 commented Oct 25, 2025

@matthewfl can you please squash commits and make sure message is canonical.
An example,

[tensorrt] Update the way layer names are created from location
We create unique layer name for TensorRT engine using op location in IR.   
Previously, when location is `CallSiteLoc`, we used name of root caller and  
ignored callee information. This change make an update to capture both caller  
and callee in name (last 3 location) to enable better tracking into IR. 

Previously the layer name was set to the root caller and ignored callee.
This change updates the layer name to capture the last 3  callees to enable
better tracking of locations in the generated TensorRT engine.
@matthewfl matthewfl force-pushed the mfl/fix-layer-naming branch from b994ef0 to 1c8829d Compare October 27, 2025 15:25
@matthewfl
Copy link
Contributor Author

@shelkesagar29 I squashed and signed the commit.

(Go ahead and click merge as I can't do it myself as an outside contributor)

@shelkesagar29 shelkesagar29 merged commit b344e42 into NVIDIA:main Oct 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants