leandron commented on a change in pull request #8720:
URL: https://github.com/apache/tvm/pull/8720#discussion_r689339791



##########
File path: python/tvm/micro/interface_api.py
##########
@@ -59,7 +60,8 @@ def generate_c_interface_header(module_name, inputs, outputs, 
output_path):
         _emit_brief(header_file, module_name, "Input tensor pointers")
         header_file.write(f"struct {mangled_name}_inputs {{\n")
         for input_name in inputs:
-            header_file.write(f"  void* {input_name};\n")
+            sanitized_input_name = re.sub(r"\W+", "_", input_name)

Review comment:
       As this will generate one `_` for each sequence of one or more 
non-alphanumerical characters, is there any **realistic** chance this 
accidentally creates the same C name for two different input sequences (think 
`index-x`, `index--x`)?
   
   Is this something that needs to be checked? I'm happy in case this is not 
something we expect to happen and leave as is.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to