Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 23 commits into from
Oct 14, 2021

Conversation

huajsj
Copy link
Contributor

@huajsj huajsj commented Sep 24, 2021

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
Contributor Author

huajsj commented Sep 24, 2021

@comaniac @masahi , please take a look.

@huajsj
Copy link
Contributor Author

huajsj commented Sep 27, 2021

@comaniac.

@comaniac
Copy link
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
Member

masahi commented Sep 28, 2021

I'll take a look tomorrow.

Copy link
Member

@masahi masahi left a comment

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.

python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
tests/python/relay/test_pipeline_executor.py Outdated Show resolved Hide resolved
tests/python/relay/test_pipeline_executor.py Outdated Show resolved Hide resolved
tests/python/relay/test_pipeline_executor.py Outdated Show resolved Hide resolved
@huajsj huajsj requested a review from masahi September 30, 2021 00:56
Copy link
Member

@masahi masahi left a comment

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.

python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
python/tvm/contrib/pipeline_executor.py Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_executor.cc Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
src/runtime/pipeline/pipeline_struct.h Outdated Show resolved Hide resolved
reader->Read(&input_name);
}
}
ICHECK(mod_idx >= 0);
Copy link
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.

Copy link
Contributor Author

@huajsj huajsj Oct 5, 2021

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.

@masahi
Copy link
Member

masahi commented Oct 4, 2021

@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 masahi October 12, 2021 01:20
@huajsj
Copy link
Contributor Author

huajsj commented Oct 12, 2021

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

fixed. @masahi , please take a look.

'"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
Member

Choose a reason for hiding this comment

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

used

@huajsj huajsj requested a review from masahi October 13, 2021 06:19
@masahi masahi merged commit b206570 into apache:main Oct 14, 2021
@masahi
Copy link
Member

masahi commented Oct 14, 2021

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 free to 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