You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/05/28 14:55:20 UTC

[GitHub] [tvm] gromero commented on a change in pull request #8153: Fix tvmc for cases when uTMV is not enabled

gromero commented on a change in pull request #8153:
URL: https://github.com/apache/tvm/pull/8153#discussion_r641602860



##########
File path: python/tvm/driver/tvmc/model.py
##########
@@ -280,7 +284,10 @@ def export_package(
                 executor_factory, package_path, cross, cross_options, output_format
             )
         elif output_format == "mlf":
-            package_path = export_model_library_format(executor_factory, package_path)
+            if export_model_library_format is not None:

Review comment:
       I would simplify this as the following, like in other parts of the code:
   
   ```
   -            if export_model_library_format is not None:
   +            if export_model_library_format:
   ```

##########
File path: python/tvm/driver/tvmc/model.py
##########
@@ -280,7 +284,10 @@ def export_package(
                 executor_factory, package_path, cross, cross_options, output_format
             )
         elif output_format == "mlf":
-            package_path = export_model_library_format(executor_factory, package_path)
+            if export_model_library_format is not None:
+                package_path = export_model_library_format(executor_factory, package_path)
+            else:
+                raise Exception("micro tvm cannot be loaded, verify USE_MICRO in config.cmake")

Review comment:
       I think it doesn't hurt to be more explicit on what we think is wrong, so I'd like to use the same message as in `session.py`, i.e.:
   
   ```
   ImportError: micro tvm is not enabled. Set USE_MICRO to ON in config.cmake
   ```




-- 
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:
users@infra.apache.org