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



##########
File path: tests/python/relay/aot/test_crt_aot.py
##########
@@ -503,5 +503,55 @@ def test_transpose(interface_api, use_unpacked_api, 
test_runner):
     )
 
 
+@parametrize_aot_options
+def test_name_sanitiser(interface_api, use_unpacked_api, test_runner):
+    """Test that input tensors with special characters in the name don't break 
compilation"""
+
+    func = relay.var("input-x::2", "float32")
+    ident = relay.Function([func], func)
+    one = np.array(1.0, "float32")
+    inputs = {"input-x::2": one}
+    output_list = generate_ref_data(ident, inputs)
+
+    compile_and_run(
+        AOTTestModel(module=IRModule.from_expr(func), inputs=inputs, 
outputs=output_list),
+        test_runner,
+        interface_api,
+        use_unpacked_api,
+        enable_op_fusion=False,
+    )
+
+
+@parametrize_aot_options

Review comment:
       Given the names only appear with `interface_api == "c"` I would suggest 
we only test for that case? That should mean we don't need to throw the 
exception again in the test utils.




-- 
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