masahi commented on code in PR #14465:
URL: https://github.com/apache/tvm/pull/14465#discussion_r1156423599


##########
src/relax/backend/contrib/cutlass/codegen.cc:
##########
@@ -219,11 +219,16 @@ class CodegenCutlass : public 
relax::MemoizedExprTranslator<OutputType>,
 
 class CutlassModuleCodegen {
  public:
-  runtime::Module CreateCSourceModule(Function f, const Map<String, 
ObjectRef>& options) {
+  runtime::Module CreateCSourceModule(Array<Function> functions,
+                                      const Map<String, ObjectRef>& options) {
     std::string headers = "";
-    auto [code, op_headers] = GenCutlassFunc(f, options);
-    for (const auto& header : op_headers) {
-      headers += "#include <" + header + ">\n";
+    std::string code = "";
+    for (const auto& f : functions) {
+      auto [f_code, op_headers] = GenCutlassFunc(f, options);
+      code += "\n" + f_code;
+      for (const auto& header : op_headers) {
+        headers += "#include <" + header + ">\n";

Review Comment:
   Here we might be adding duplicated headers. It probably won't matter for 
compilation speed but the generated file might get ugly. 



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