Skip to content

Commit 29c5cad

Browse files
committed
addres review comments.
1 parent fe6a79a commit 29c5cad

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/runtime/pipeline/pipeline_executor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void PipelineExecutor::Init(const std::vector<Module>& modules, const std::strin
127127
// Use JSONReader to load pipeline configuration.
128128
std::istringstream is(pipeline_json);
129129
dmlc::JSONReader reader(&is);
130-
ConfigPipelineExecution& pipeline_config = this->LoadConfigPipelineExecution(&reader);
130+
ConfigPipelineExecution& pipeline_config = this->LoadConfig(&reader);
131131
ICHECK(!pipeline_config.Empty()) << "The pipeline config information is empty.";
132132
// Initialize the pipeline function class used for pipeline thread pool management
133133
// and schedule etc. This function returns the number of output.

src/runtime/pipeline/pipeline_executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class TVM_DLL PipelineExecutor : public ModuleNode {
131131
/*!\brief How many outputs are in this pipeline executor.*/
132132
size_t num_outputs_ = 0;
133133
/*!\brief Json loader.*/
134-
ConfigPipelineExecution& LoadConfigPipelineExecution(dmlc::JSONReader* reader) {
134+
ConfigPipelineExecution& LoadConfig(dmlc::JSONReader* reader) {
135135
reader->BeginObject();
136136
std::string key;
137137
while (reader->NextObjectItem(&key)) {

src/runtime/pipeline/pipeline_struct.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@
2727
#include <unordered_map>
2828
#include <utility>
2929
#include <vector>
30-
#define GLOBAL_MODULE_INDEX -1
3130
/*!
3231
* \brief All binding information of a output interface.
3332
*/
3433
class ConfigBindings {
3534
public:
3635
/*!\brief Whether this binding is bound to the PipelineExecutor output interface.*/
37-
bool IsGlobalOutput() const { return global_output_index_ > GLOBAL_MODULE_INDEX; }
36+
bool IsGlobalOutput() const { return global_output_index_ > -1; }
3837

3938
/*!
4039
* \brief Create a module interface map from JSONReader.

0 commit comments

Comments
 (0)