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

[RELAY]Switch from CompileEngine to TECompiler in Interpreter #8486

Merged
merged 1 commit into from
Jul 17, 2021

Conversation

mbs-octoml
Copy link
Contributor

@mbs-octoml mbs-octoml commented Jul 16, 2021

This continues on:
[RFC][Relay] TECompiler: Rewrite existing compile engine to match updated compiler flow
and #7518, this time just replacing CompileEngine with TECompiler in the Interpreter,
using the JIT helper added to help the transition.

Some whitespace improvements while there.

// Backend compile engine.
CompileEngine engine_;
// TE-to-TIR lowerer (compiler).
TECompiler compiler_;
Copy link
Contributor

@xqdan xqdan Jul 16, 2021

Choose a reason for hiding this comment

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

It's not related this pr, but is it possible to hold a customzied TECompiler? Say if it is NPU TECompiler, which has differnent pass flow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ultimately we want to enable customized rewrites/transforms at all stages. This work is just getting us out of the go-straight-to-packed-func world so we can have a representation which makes the current te visible.

This is my first week so I'm just wrapping my head around this -- I defer to Jarad for the True Story.

Copy link
Member

Choose a reason for hiding this comment

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

@xqdan the goal of TECompile is to have one lowering which applies initial scheduling to functions and puts them in the IRModule. After this users can customize the flow for specific targets or executors.

@mbs-octoml mbs-octoml changed the title Switch from CompileEngine to TECompiler in Interpreter [RELAY]Switch from CompileEngine to TECompiler in Interpreter Jul 16, 2021
This continues on:
https://discuss.tvm.apache.org/t/rfc-relay-tecompiler-rewrite-existing-compile-engine-to-match-updated-compiler-flow/9233
and apache#751, this time just replacing CompileEngine with TECompiler in the Interpreter,
using the JIT helper added to help the transition.

Some whitespace improvements while there.
@mbs-octoml
Copy link
Contributor Author

@jroesch for review

@mbs-octoml mbs-octoml marked this pull request as ready for review July 16, 2021 17:00
// Backend compile engine.
CompileEngine engine_;
// TE-to-TIR lowerer (compiler).
TECompiler compiler_;
Copy link
Member

Choose a reason for hiding this comment

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

@xqdan the goal of TECompile is to have one lowering which applies initial scheduling to functions and puts them in the IRModule. After this users can customize the flow for specific targets or executors.

@junrushao
Copy link
Member

CC @icemelon9 for review :-)

@junrushao junrushao merged commit 2c61afa into apache:main Jul 17, 2021
@junrushao
Copy link
Member

Thanks @mbs-octoml @xqdan @jroesch! It is merged

@mbs-octoml mbs-octoml deleted the mbs-tecompilercleanup branch July 19, 2021 16:54
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
This continues on:
https://discuss.tvm.apache.org/t/rfc-relay-tecompiler-rewrite-existing-compile-engine-to-match-updated-compiler-flow/9233
and apache#751, this time just replacing CompileEngine with TECompiler in the Interpreter,
using the JIT helper added to help the transition.

Some whitespace improvements while there.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
This continues on:
https://discuss.tvm.apache.org/t/rfc-relay-tecompiler-rewrite-existing-compile-engine-to-match-updated-compiler-flow/9233
and apache#751, this time just replacing CompileEngine with TECompiler in the Interpreter,
using the JIT helper added to help the transition.

Some whitespace improvements while there.
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.

None yet

4 participants