Skip to content

[Runtime] Pipeline Executor Second patch, configuration load and executor export/import. - #9108

Merged
masahi merged 23 commits into
apache:mainfrom
huajsj:small
Oct 14, 2021
Merged

[Runtime] Pipeline Executor Second patch, configuration load and executor export/import.#9108
masahi merged 23 commits into
apache:mainfrom
huajsj:small

Conversation

@huajsj

Copy link
Copy Markdown
Contributor

This patch is one of serial patch for PR 7892 splitting. this is second part the pipeline executor, include the configuration JSON file load and pipeline executor export and import.

@huajsj

Copy link
Copy Markdown
ContributorAuthor

@comaniac@masahi , please take a look.

@huajsj

Copy link
Copy Markdown
ContributorAuthor

@comaniac.

@comaniac

Copy link
Copy Markdown
Contributor

Probably don't have many bandwidths this week to review this PR but I'll try.
cc @masahi to see if there's any chance.

@masahi

Copy link
Copy Markdown
Member

I'll take a look tomorrow.

@masahimasahi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the first pass, still too many basic grammar errors that distract me from focusing on technical details.

I don't want to correct all of them, so please go through ALL of your change again:

  • Fix as many grammar mistake as possible. Things like the lack of a, the or s for plural, third person pronoun (this function return -> this function returns).
  • Variable names should be snake_case
  • You use the term configure as if it was a noun. Replace all of them with config.

Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadtests/python/relay/test_pipeline_executor.py Outdated
Comment threadtests/python/relay/test_pipeline_executor.py Outdated
Comment threadtests/python/relay/test_pipeline_executor.py Outdated
@huajsj
huajsj requested a review from masahiSeptember 30, 2021 00:56

@masahimasahi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still many grammar and other minor errors. Please go through them again. Correcting only the ones I pointed out is not sufficient.

Remove all _configure names as I said in the previous review.

In many places you use an index subtracted by 1, like string_config[mod_idx - 1] = mconf. I don't like them. Please restructure your code so that such weird indexing is unnecessary.

Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.cc Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_function.cc Outdated
Comment threadsrc/runtime/pipeline/pipeline_function.cc Outdated
Comment threadsrc/runtime/pipeline/pipeline_function.h Outdated
reader->Read(&input_name);
}
}
ICHECK(mod_idx >= 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this mod_idx can be zero while others are > 0? I think it is confusing.

@huajsjhuajsjOct 5, 2021

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in module config file, there are 2 place have mod_idx information , first is the module list with output, here all module is graphexecutor module, and no PipelineExecutor or global module here, the second place is the binding place that use to describe which output binding with which module input/output, here the module can be graphexecutor module or PipelineExecutor/global module, because we need import data or output data for PipelineExecutor, that is the reason why in different place there are difference check logic.

added related comments for the said logic explain.

Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
@masahi

Copy link
Copy Markdown
Member

@huajsj Why mod_index etc starts from 1? What does index 0 corresponds to? Unless there is a good reason for this weird design, please make all indices start from 0.

@huajsj
huajsj requested a review from masahiOctober 12, 2021 01:20
@huajsj

Copy link
Copy Markdown
ContributorAuthor

Your latest commit cdfa5c2 is full of grammar issues. Please take a look again.

fixed. @masahi , please take a look.

Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
'"load_config" or "pipeline_config" is missing in %s' % config_file_name
)

# The config file use to load library, prameters, and JSON files.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

used

Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadpython/tvm/contrib/pipeline_executor.py Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_executor.h Outdated
Comment threadsrc/runtime/pipeline/pipeline_struct.h Outdated
@huajsj
huajsj requested a review from masahiOctober 13, 2021 06:19
@masahi
masahi merged commit b206570 into apache:mainOct 14, 2021
@masahi

Copy link
Copy Markdown
Member

thanks @huajsj@comaniac

masahi pushed a commit to Laurawly/tvm-1 that referenced this pull request Oct 14, 2021
…utor export/import. (apache#9108)
* [pipeline executor] Add configuration load function and pipeline executor export,import function.
* address review comments.
* polish comments and doc string.
* address review comments.
* address review comments.
* Change mod_idx start from 0, remove mod_idx - 1 logic.
* address review comments.
* polish documents.
* adress review comments
* address review comments.
* address review comments.
* polish the document.
* address review comments.
* address review comments.
* polish comments.
* Triger build.
* address review comments.
* address review comments.
* fix grammar issue.
* polish documents.
* add single global binding check.
* address review comments.
* trigger build.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
…utor export/import. (apache#9108)
* [pipeline executor] Add configuration load function and pipeline executor export,import function.
* address review comments.
* polish comments and doc string.
* address review comments.
* address review comments.
* Change mod_idx start from 0, remove mod_idx - 1 logic.
* address review comments.
* polish documents.
* adress review comments
* address review comments.
* address review comments.
* polish the document.
* address review comments.
* address review comments.
* polish comments.
* Triger build.
* address review comments.
* address review comments.
* fix grammar issue.
* polish documents.
* add single global binding check.
* address review comments.
* trigger build.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
…utor export/import. (apache#9108)
* [pipeline executor] Add configuration load function and pipeline executor export,import function.
* address review comments.
* polish comments and doc string.
* address review comments.
* address review comments.
* Change mod_idx start from 0, remove mod_idx - 1 logic.
* address review comments.
* polish documents.
* adress review comments
* address review comments.
* address review comments.
* polish the document.
* address review comments.
* address review comments.
* polish comments.
* Triger build.
* address review comments.
* address review comments.
* fix grammar issue.
* polish documents.
* add single global binding check.
* address review comments.
* trigger build.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@huajsj@comaniac@masahi