Skip to content

Merge master changes -> 7.1#547

Merged
kevinch-nv merged 6 commits into7.1from
master
Oct 20, 2020
Merged

Merge master changes -> 7.1#547
kevinch-nv merged 6 commits into7.1from
master

Conversation

@kevinch-nv
Copy link
Copy Markdown
Collaborator

@kevinch-nv kevinch-nv commented Oct 20, 2020

Merge master changes for 7.1 to 7.1 branch.

Signed-off-by Kevin Chen kevinch@nvidia.com

kevinch-nv and others added 6 commits July 8, 2020 17:04
Suppose we have a network with (not all distinct) layer names

layer
layer_1
layer

When ImporterContext sees "layer", it sees it's not in mLayerNameCounts,
and sets mLayerNameCounts["layer"] = 1 and adds a TRT layer with name "layer".
It then sees "layer_1", concludes it's not in mLayerNameCounts, so it sets
mLayerNameCounts["layer_1"] = 1 and adds a TRT layer with name "layer_1".
NOW when it sees "layer", it sees that mLayerNameCounts["layer"] == 1,
so we produce a "uniqueName" of
"layer" + "_" + std::to_string(mLayerNameCounts["layer"] ), ie "layer_1",
which is a name conflict for the TRT net.

This change keeps track of all inserted names in a set and in the case of
duplicates, tries suffix-appended modifications of the duplicated name
by ever increasing integers until a name appears which has not been used.
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
@kevinch-nv kevinch-nv self-assigned this Oct 20, 2020
@kevinch-nv kevinch-nv merged commit 7eb49ff into 7.1 Oct 20, 2020
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