mkatanbaf commented on code in PR #12495:
URL: https://github.com/apache/tvm/pull/12495#discussion_r961433712


##########
python/tvm/micro/testing/evaluation.py:
##########
@@ -124,21 +124,32 @@ def create_aot_session(
     parameter_size = len(tvm.runtime.save_param_dict(lowered.get_params()))
     print(f"Model parameter size: {parameter_size}")
 
-    project = tvm.micro.generate_project(
-        str(tvm.micro.get_microtvm_template_projects(platform)),
-        lowered,
-        build_dir / "project",
-        {
-            f"{platform}_board": board,
-            "project_type": "host_driven",
-            # {} shouldn't be the default value for project options ({}
-            # is mutable), so we use this workaround
-            **(project_options or {}),
-        },
-    )
-    project.build()
-    project.flash()
+    if debug:
+        project = tvm.micro.GeneratedProject.from_directory(
+            str(build_dir / "project"),
+            options={
+                f"{platform}_board": board,
+                "project_type": "host_driven",
+                **(project_options or {}),
+            },
+        )
 
+    else:
+        project = tvm.micro.generate_project(
+            str(tvm.micro.get_microtvm_template_projects(platform)),
+            lowered,
+            build_dir / "project",
+            {
+                f"{platform}_board": board,
+                "project_type": "host_driven",
+                # {} shouldn't be the default value for project options ({}
+                # is mutable), so we use this workaround
+                **(project_options or {}),

Review Comment:
   done



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