giuseros commented on a change in pull request #8014:
URL: https://github.com/apache/tvm/pull/8014#discussion_r631680451



##########
File path: python/tvm/micro/model_library_format.py
##########
@@ -55,17 +55,19 @@ def _populate_codegen_dir(mod, codegen_dir: str):
 
     mod_indices = {"lib": 0, "src": 0}
     host_codegen_dir = os.path.join(codegen_dir, "host")
+    lib_name = f"{model_name}_lib" if model_name else "lib"
+
     for dso_mod in dso_modules:
         if dso_mod.type_key == "c":
             index = mod_indices["src"]
             mod_indices["src"] += 1
             parent_dir = os.path.join(host_codegen_dir, "src")
-            file_name = os.path.join(parent_dir, f"lib{index}.c")
+            file_name = os.path.join(parent_dir, f"{lib_name}{index}.c")

Review comment:
       Mmmm... Not sure I follow :) To be clear, I am adding a prefix to the 
lib names so that multiple source files can be in the same folder. Otherwise 
the user would need to compile each library and manually copy/paste the 
`lib*.c` files in a common folder with different names. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to