Skip to content

Fix Clean_name() to replace dots with underscores instead of erasing#10

Open
AdityaDRathore wants to merge 1 commit intoML4EP:devfrom
AdityaDRathore:fix/clean-name-dot-collision
Open

Fix Clean_name() to replace dots with underscores instead of erasing#10
AdityaDRathore wants to merge 1 commit intoML4EP:devfrom
AdityaDRathore:fix/clean-name-dot-collision

Conversation

@AdityaDRathore
Copy link

Clean_name() in SOFIE_common.cxx erases dot characters from tensor names instead of replacing them with a safe character. This causes tensor name collisions when parsing TorchScript models whose ONNX graphs contain dotted intermediate names (e.g., 'input.1' and 'input1' both map to 'input1').

Add std::replace for '.' -> '' consistent with existing '-' -> '' treatment. This makes 'input.1' -> 'input_1' (distinct from 'input1').

Got this issue during testing of root-project/root#21528.

Reported in root-project/root#21527.

Clean_name() in SOFIE_common.cxx erases dot characters from tensor
names instead of replacing them with a safe character. This causes
tensor name collisions when parsing TorchScript models whose ONNX
graphs contain dotted intermediate names (e.g., 'input.1' and 'input1'
both map to 'input1').

Add std::replace for '.' -> '_' consistent with existing '-' -> '_'
treatment. This makes 'input.1' -> 'input_1' (distinct from 'input1').

Got this issue during testing of root-project/root#21528.

Reported in root-project/root#21527.
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.

1 participant