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

Error with specializer when max_depth > 1 #89

Open
breuleux opened this issue Jun 18, 2018 · 0 comments
Open

Error with specializer when max_depth > 1 #89

breuleux opened this issue Jun 18, 2018 · 0 comments

Comments

@breuleux
Copy link
Member

When using the inferrer with max_depth > 1, meaning that we propagate values for more than one level, the specializer produces erroneous graphs. The problem occurs with test_pow10 and also with the following:

@specialize((int1,))
def test_fact(x):
    def fact(x, a):
        if x == 1:
            return a
        else:
            return fact(x - 1, a * x)

    return fact(x, 1)

The VM complains about a cycle in that case. When looking at the graph, some free variables also seem to point to inputs in the wrong copy, and the generation also seems a little non-deterministic. There is clearly a bug somewhere.

We will not try to fix this immediately, since max_depth=1 is probably the setting we want, at least for the time being, and no problems have been diagnosed yet in that situation.

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

No branches or pull requests

1 participant