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] C++ GraphRuntimeCodegen, Deprecate Python2 #2986

Merged
merged 6 commits into from
Apr 12, 2019

Conversation

antinucleon
Copy link
Contributor

@antinucleon antinucleon commented Apr 8, 2019

Add C++ GraphRuntimeCodegen.
Deprecate Python GraphRuntimeCodegen.
Deprecate Python2.

@antinucleon
Copy link
Contributor Author

I am hitting issue with Python2 relative import issue in CI. I am wondering whether we should disable all python2 test according to this RFC(#2715), or we should fix this Python2 issue.

@tqchen

/*! \brief Visitors */
std::unordered_map<Expr, std::vector<GraphNodeRef>, NodeHash, NodeEqual> visitor_cache_;

std::vector<GraphNodeRef> VisitExpr(const Expr& expr) override {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to overload this function?, this should happen by default

Copy link
Contributor Author

@antinucleon antinucleon Apr 10, 2019

Choose a reason for hiding this comment

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

I think we need if we want to use cache.

Copy link
Member

Choose a reason for hiding this comment

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

Oh right caching only exists for the Mutator/Visitor

CompileEngine compile_engine_;
};

class GraphRuntimeCodegenModule : public runtime::ModuleNode {
Copy link
Member

Choose a reason for hiding this comment

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

I think this makes sense for now, but in general I'm not a huge fan of reusing tvm::Module to implement this stringly typed function lookup map. Is there a better way to do this @tqchen ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a stateful function. I think Module is a convenient & clean way to do this.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I understand, the string based dispatch of module isn't my favorite design we just did the same thing in the VTA simulator stuff.

@jroesch
Copy link
Member

jroesch commented Apr 10, 2019

Just some minor comments from me.

@antinucleon
Copy link
Contributor Author

@jroesch Relay C++ Build module depends on this PR. Please let me know if there is anything more needed for this PR.

@antinucleon antinucleon changed the title [Relay] C++ GraphRuntimeCodegen [Relay] C++ GraphRuntimeCodegen, Deprecate Python2 Apr 12, 2019
Copy link
Contributor

@wweic wweic left a comment

Choose a reason for hiding this comment

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

Nice change! Have a minor comment.

tests/scripts/task_python_integration.sh Show resolved Hide resolved
src/relay/backend/graph_runtime_codegen.cc Outdated Show resolved Hide resolved
@jroesch
Copy link
Member

jroesch commented Apr 12, 2019

@antinucleon can you just fix the last comment from @wweic then we can merge?

@Laurawly Laurawly merged commit 8b71a28 into apache:master Apr 12, 2019
@Laurawly
Copy link
Contributor

Thanks @antinucleon @jroesch @wweic, this is now merged.

@antinucleon antinucleon deleted the pr branch April 18, 2019 22:11
wweic pushed a commit to wweic/tvm that referenced this pull request May 13, 2019
* [Relay] C++ GraphRuntimeCodegen

* [Test] Deprecate Python2

* [Python3] Add Py2 check

* Update _pyversion.py

* [Python3] Update test
wweic pushed a commit to neo-ai/tvm that referenced this pull request May 13, 2019
* [Relay] C++ GraphRuntimeCodegen

* [Test] Deprecate Python2

* [Python3] Add Py2 check

* Update _pyversion.py

* [Python3] Update test
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.

4 participants