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 2022/11/26 03:58:41 UTC

[GitHub] [tvm] jinhongyii opened a new pull request, #13489: [RUNTIME] Correctly handling export_module when exporting modules of different type

jinhongyii opened a new pull request, #13489:
URL: https://github.com/apache/tvm/pull/13489

   Previously the `export_module` function assumes that the module and all imported modules have the same `type_key`. If we have a host llvm module and some imported c modules, it may fail to set the `llvm_target_string` and `object_format` correctly, and thus fail to continue with the llvm build flow.
   
   In this PR, I set the object format of a mixed-type module to that of the host module, and always set `llvm_target_string` when we see a host llvm module.
   
   cc: @tqchen @YuchenJin 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tqchen commented on pull request #13489: [RUNTIME] Correctly handling export_module when exporting modules of different type

Posted by GitBox <gi...@apache.org>.
tqchen commented on PR #13489:
URL: https://github.com/apache/tvm/pull/13489#issuecomment-1327976242

   Thanks hongyi. This is a hidden issue as previous behavior will still go through the c export route, and not the llvm one. Which is still correct for small module size. But it will cost long export time for bigger models. cc @jwfromm 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tqchen commented on a diff in pull request #13489: [RUNTIME] Correctly handling export_module when exporting modules of different type

Posted by GitBox <gi...@apache.org>.
tqchen commented on code in PR #13489:
URL: https://github.com/apache/tvm/pull/13489#discussion_r1032846388


##########
tests/python/unittest/test_runtime_module_export.py:
##########
@@ -203,7 +204,10 @@ def verify_multi_c_mod_export():
         synthetic_cpu_lib.import_module(f)
         synthetic_cpu_lib.import_module(engine_module)
         kwargs = {"options": ["-O2", "-std=c++17", "-I" + header_file_dir_path.relpath("")]}
-        synthetic_cpu_lib.export_library(path_lib, fcompile=False, **kwargs)
+        work_dir = temp.relpath("work_dir")
+        os.mkdir(work_dir)
+        synthetic_cpu_lib.export_library(path_lib, fcompile=False, workspace_dir=work_dir, **kwargs)
+        assert os.path.exists(work_dir + "/devc.o")

Review Comment:
   use 
   
   `os.path.join(work_dir, "devc.o")` so it can be portable across OS with different separators



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tqchen merged pull request #13489: [RUNTIME] Correctly handling export_module when exporting modules of different type

Posted by GitBox <gi...@apache.org>.
tqchen merged PR #13489:
URL: https://github.com/apache/tvm/pull/13489


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13489: [RUNTIME] Correctly handling export_module when exporting modules of different type

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13489:
URL: https://github.com/apache/tvm/pull/13489#issuecomment-1327974509

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @areusch <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org