tvm
tvm copied to clipboard
[BugFix][MSC] split name_string with index by colon from the right
Fixes a naming mismatch in MSCGraph where tensor_name could formatted as 'string:index:index',and the corresponding node.name is 'string:index'. Splitting tensor_name from the right aligns it correctly.
For example, the TFLite default input name 'serving_default_input:0' becomes 'serving_default_input:0:0' in MSCGraph, while node.name remains 'serving_default_input:0'.
cc @Archermmt
Thanks for the fix @psunn, would it be possible to add a test case?
@lhutton1 Thanks for the review. I've added a test case.
Hi @Archermmt, could you help to review this PR? thanks in advance.
Seem ok for me. The only change in this PR is the split direction, which has no influence on current test. I think the main reason is that: in some corner cases like TFLite model, the node name looks like "NODE:IDX", which is normally the tensor name format.
@Archermmt thanks for review. Yes, the change in this PR has no effect on existing tests. An additional test case has been added to cover node name_string with an index by colon.
I force-pushed only to address linting issues.
@lhutton1 @Archermmt @Hzfengsy Would it be okay to merge it? thanks.
Thanks @psunn @Archermmt @Hzfengsy!