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/10/01 04:20:08 UTC
[GitHub] [tvm] huajsj commented on a change in pull request #9108: [Runtime] Pipeline Executor Second patch, configuration load and executor export/import.
huajsj commented on a change in pull request #9108:
URL: https://github.com/apache/tvm/pull/9108#discussion_r719925924
##########
File path: python/tvm/contrib/pipeline_executor.py
##########
@@ -501,17 +537,18 @@ class PipelineExecutorFactoryModule(object):
"""
- def __init__(self, pipeline_mods, mods_config):
- mods, config = self.graph_executor_create(pipeline_mods, mods_config)
- assert (
- pipeline_executor_enabled()
- ), "Pipeline executor is not enabled. Please \
- re-build TVM with USE_PIPELINE_EXECUTOR=ON"
- pipeline_create = tvm._ffi.get_global_func(
+ def __init__(self, pipeline_libs=None, mods_config=None):
+ self.pipeline_libs = pipeline_libs
+ self.mods_config = mods_config
+ self.pipeline_create = tvm._ffi.get_global_func(
"tvm.pipeline_executor.create", allow_missing=False
)
- assert pipeline_create
- self.module = pipeline_create(mods, config)
+ self.module = None
+ # Only create pipeline executor when pipeline_libs, mods_config and
+ # self.pipeline_create are not None.
+ if pipeline_libs and mods_config and self.pipeline_create:
Review comment:
fixed.
--
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