From ca2c23e4c9f8cff482bcc9ad38b74bad2e6cc8fd Mon Sep 17 00:00:00 2001 From: huajsj Date: Thu, 16 Dec 2021 11:36:54 -0800 Subject: [PATCH] address review comments. --- src/runtime/pipeline/pipeline_executor.cc | 6 +++--- src/runtime/pipeline/pipeline_executor.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/pipeline/pipeline_executor.cc b/src/runtime/pipeline/pipeline_executor.cc index 491e1e49f805c..32414c607df6f 100644 --- a/src/runtime/pipeline/pipeline_executor.cc +++ b/src/runtime/pipeline/pipeline_executor.cc @@ -127,11 +127,11 @@ void PipelineExecutor::Init(const std::vector& modules, const std::strin // Use JSONReader to load pipeline configuration. std::istringstream is(pipeline_json); dmlc::JSONReader reader(&is); - ConfigPipelineExecution& pipeline_config = this->LoadConfig(&reader); - ICHECK(!pipeline_config.Empty()) << "The pipeline config information is empty."; + this->LoadConfig(&reader); + ICHECK(!pipeline_config_.Empty()) << "The pipeline config information is empty."; // Initialize the pipeline function class used for pipeline thread pool management // and schedule etc. This function returns the number of output. - num_outputs_ = pipeline_scheduler_.PipelineInit(modules, pipeline_config); + num_outputs_ = pipeline_scheduler_.PipelineInit(modules, pipeline_config_); return; } diff --git a/src/runtime/pipeline/pipeline_executor.h b/src/runtime/pipeline/pipeline_executor.h index 28234e1bdcf08..1ae52e07c2607 100644 --- a/src/runtime/pipeline/pipeline_executor.h +++ b/src/runtime/pipeline/pipeline_executor.h @@ -131,7 +131,7 @@ class TVM_DLL PipelineExecutor : public ModuleNode { /*!\brief How many outputs are in this pipeline executor.*/ size_t num_outputs_ = 0; /*!\brief Json loader.*/ - ConfigPipelineExecution& LoadConfig(dmlc::JSONReader* reader) { + void LoadConfig(dmlc::JSONReader* reader) { reader->BeginObject(); std::string key; while (reader->NextObjectItem(&key)) { @@ -143,7 +143,7 @@ class TVM_DLL PipelineExecutor : public ModuleNode { LOG(FATAL) << "do not support key " << key; } } - return pipeline_config_; + return; } }; } // namespace runtime