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

[Refactor] Add memoized expr translator for use by backend codegen #5325

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

masahi
Copy link
Member

@masahi masahi commented Apr 13, 2020

Related discussion: https://discuss.tvm.ai/t/missing-memoization-in-exprfunctor/6334

The rationale is two fold:

  • Clean up existing code that has duplicated memo logic and unnecessary VisitExpr(const Expr& n) override
  • More importantly, to remove the cognitive load of having to do memoization by external codegen implementers. Most likely any external codegen needs some memoization. It would be better to take care of this in the Relay side once for all, so that there would be no chance of forgetting to do memoization and having a bad time (which happened to me).

please review @tqchen @zhiics

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM

@tqchen tqchen merged commit 2c1ca60 into apache:master Apr 14, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Apr 16, 2020
dpankratz pushed a commit to dpankratz/incubator-tvm that referenced this pull request Apr 24, 2020
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