areusch commented on a change in pull request #8720:
URL: https://github.com/apache/tvm/pull/8720#discussion_r692400277
##########
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:
hey guys--what if i have two input parameters e.g. `input-foo` and
`input_foo`? i would like us to handle this case if possible,
##########
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:
hey guys--what if i have two input parameters e.g. `input-foo` and
`input_foo`? i would like us to handle this case if possible.
--
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]