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



##########
File path: tests/cpp/target/source/interface_c_test.cc
##########
@@ -69,7 +69,29 @@ TEST(InterfaceAPI, ContainsRunFunction) {
                << "  struct tvmgen_ultimate_cat_spotter_outputs* outputs\n"
                << ");\n";
 
-  runtime::Module test_module = InterfaceCCreate("ultimate_cat_spotter", 
{"input"}, {"output"});
+  runtime::Module test_module = InterfaceCCreate("ultimate_cat_spotter", 
{"input"}, {"output"}, {});
+  std::string header_source = test_module->GetSource();
+
+  ASSERT_THAT(header_source, HasSubstr(run_function.str()));
+}
+
+TEST(InterfaceAPI, ContainsRunFunctionWithDevices) {
+  std::stringstream run_function;
+
+  run_function << "/*!\n"
+               << " * \\brief entrypoint function for TVM module 
\"ultimate_cat_spotter\"\n"
+               << " * \\param inputs Input tensors for the module \n"

Review comment:
       Personally, I think it's neater to define the specific module at the top 
of the `\brief` and then reference it from the params,  so if you generate docs 
you get all the information for the struct without too much repetition. As 
that's the current behaviour of the generator, if we do want to make changes to 
the copy it'll introduce a lot of noise so we should do it in a separate PR 
:smile_cat: 




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