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

Make sure to visit the arguments of inlined functions #4783

Merged
merged 1 commit into from Jan 30, 2020

Conversation

abergeron
Copy link
Contributor

This is a potential fix for #4758

I found out what causes the issue. The module I test with has two CallNode expressions that reference the match clause: %5 = @fn(%4); and add(%2, %5).

One of these uses the GlobalVarNode path at line https://github.com/apache/incubator-tvm/blob/master/src/relay/backend/vm/inline_primitives.cc#L94 which doesn't visit its arguments but just uses them directly from the original expression.

The other uses the default path at the end of the CallNode visitor which does visit its arguments, clones the match and uses it for the new call node it returns.

My fix is to always visit the arguments so that all path use the same "version" of the expressions.

Copy link
Member

@jroesch jroesch left a comment

Choose a reason for hiding this comment

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

Yeah looks like a dumb bug on my part, thanks!

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

2 participants