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

[Hybrid script] Backend support #2477

Merged
merged 31 commits into from
Feb 13, 2019
Merged

[Hybrid script] Backend support #2477

merged 31 commits into from
Feb 13, 2019

Conversation

were
Copy link
Contributor

@were were commented Jan 21, 2019

Finally, the interface looks like:

module = tvm.hybrid.build(sch, ins, outs)

In general, two major things are going in this PR:
A hybrid script text format is supported:

  1. It has better naming support than the default IRPrinter.
  2. When designing hybrid script it is for Phase 0 IR, so this dumper cannot be a standalone dumper. You can only use it to dump Phase 0 IR.
  3. Stores hybrid script as source code.
  4. Can be used the same as a hybrid script function (both sw emu & hw run).

Minor things:

  1. Hybrid code module refactor:
    1.1 util.py & calls.py mainly is in charge of compilation time, and intrinsic.py is renamed to runtime.py to be in charge of hybrid script runtime.
    1.2 Redundant api.py is merged to __init.py.
  2. AssertStmt is supported; type cast is supported as it is required by [TOPI][CUDA] Add faster-rcnn proposal op #2420.

python/tvm/build_module.py Outdated Show resolved Hide resolved
python/tvm/hybrid/__init__.py Outdated Show resolved Hide resolved
python/tvm/hybrid/__init__.py Show resolved Hide resolved
@were were changed the title [WIP] [Hybrid script] Backend support [Hybrid script] Backend support Feb 12, 2019
@were
Copy link
Contributor Author

were commented Feb 12, 2019

@tqchen @xqdan @junrushao1994 @merrymercy @kevinthesun
I think this PR is mature enough.

@were
Copy link
Contributor Author

were commented Feb 12, 2019

@Laurawly @vinx13 Anyone can take a look?

Copy link
Contributor

@xqdan xqdan left a comment

Choose a reason for hiding this comment

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

looks good to me now, thanks @were

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

looks good

@tqchen
Copy link
Member

tqchen commented Feb 13, 2019

A good set of changes. Note that we do not need to make hybrid dump optional. The reason that random and NNPack are optional is that they are linked into the runtime library and have additional dependencies.

Hybrid dump is a compiler feature, that you should add to COMPILER_SRCS by default

@tqchen
Copy link
Member

tqchen commented Feb 13, 2019

@Laurawly please moderate this pr as per https://docs.tvm.ai/contribute/committer_guide.html

Copy link
Member

@tqchen tqchen left a comment

Choose a reason for hiding this comment

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

change build rule as per my comment

@were
Copy link
Contributor Author

were commented Feb 13, 2019

@tqchen Done.

@were
Copy link
Contributor Author

were commented Feb 13, 2019

change build rule as per my comment

Done.

.ycm_extra_conf.py Outdated Show resolved Hide resolved
@Laurawly Laurawly self-assigned this Feb 13, 2019
@Laurawly Laurawly merged commit c53dd10 into apache:master Feb 13, 2019
@Laurawly
Copy link
Contributor

Laurawly commented Feb 13, 2019

Thanks @were @junrushao1994 @xqdan @vinx13 , this is now merged

@were were mentioned this pull request Feb 14, 2019
libing4752 pushed a commit to libing4752/tvm that referenced this pull request Feb 18, 2019
* a preliminary version is done?

* we no longer need the redundant hybrid/api.py

* support assert stmt

* cast supported

* intrin -> runtime; util is mainly in charge of compilation time

* assert statement

* fix python lint

* fix cpp lint

* on the way to module

* rollback .cc

* fix typo, no direct expose then

* @vinx13 ceil is added i guess?

* wip...

* temp commit

* fix import

* i preliminary version is done?

* on the way to build hybrid module

* nearly fixed...

* dumped python are equiv as original python

* on the way to bootstrap

* cpu bootstrap done

* bootstrap!

* fix lint

* fix doc

* resolve some review concerns

* support load/save

* fix lint

* thanks to xqdan fixed my typo

* fix build, make dump non-optional

* add vthread

* jesus why i added this
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
* a preliminary version is done?

* we no longer need the redundant hybrid/api.py

* support assert stmt

* cast supported

* intrin -> runtime; util is mainly in charge of compilation time

* assert statement

* fix python lint

* fix cpp lint

* on the way to module

* rollback .cc

* fix typo, no direct expose then

* @vinx13 ceil is added i guess?

* wip...

* temp commit

* fix import

* i preliminary version is done?

* on the way to build hybrid module

* nearly fixed...

* dumped python are equiv as original python

* on the way to bootstrap

* cpu bootstrap done

* bootstrap!

* fix lint

* fix doc

* resolve some review concerns

* support load/save

* fix lint

* thanks to xqdan fixed my typo

* fix build, make dump non-optional

* add vthread

* jesus why i added this
wweic pushed a commit to neo-ai/tvm that referenced this pull request Feb 20, 2019
* a preliminary version is done?

* we no longer need the redundant hybrid/api.py

* support assert stmt

* cast supported

* intrin -> runtime; util is mainly in charge of compilation time

* assert statement

* fix python lint

* fix cpp lint

* on the way to module

* rollback .cc

* fix typo, no direct expose then

* @vinx13 ceil is added i guess?

* wip...

* temp commit

* fix import

* i preliminary version is done?

* on the way to build hybrid module

* nearly fixed...

* dumped python are equiv as original python

* on the way to bootstrap

* cpu bootstrap done

* bootstrap!

* fix lint

* fix doc

* resolve some review concerns

* support load/save

* fix lint

* thanks to xqdan fixed my typo

* fix build, make dump non-optional

* add vthread

* jesus why i added this
@yzhliu yzhliu mentioned this pull request Mar 2, 2019
28 tasks
@were were deleted the hybrid-module branch July 22, 2021 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants