ashutosh-arm commented on code in PR #13655:
URL: https://github.com/apache/tvm/pull/13655#discussion_r1059341351


##########
python/tvm/testing/aot.py:
##########
@@ -415,24 +415,23 @@ def _emit_main_compare(main_file, outputs, 
output_tolerance, mod_name, use_inter
             comparison_function = "fabs"
             tolerance = output_tolerance or 0.001
 
-        data_length_var_name = (
-            _mangle_name(mod_name, f"output_data_{sanitized_tensor_name}") + 
"_len"
+        actual_data_name = _mangle_name(mod_name, 
f"output_data_{sanitized_tensor_name}")
+        data_len_var = actual_data_name + "_len"
+        main_file.write(
+            f"const size_t {data_len_var}"
+            f"= sizeof({actual_data_name})/sizeof({actual_data_name}[0]);\n"

Review Comment:
   As discussed offline, the two variables `LEN` and `SIZE` serve different 
purposes. `SIZE` will come from MLF export whereas `LEN` will be part of the 
AOT test harness.



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