-
Notifications
You must be signed in to change notification settings - Fork 35
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
Inference issues with broadcasting #153
Comments
Defining the following seems to make it infer (I think). That's based on a hint in another inference issue. @inline Cassette.overdub(ctx::Ctx, f, args...) = f(args...) |
But, does that bypass the overdubbing? |
That certainly bypasses overdubbing, for inference failures I recommend
using Cthulhu to understand and isolate the failure.
…On Fri, Oct 18, 2019, 18:38 Tom Short ***@***.***> wrote:
But, does that bypass the overdubbing?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#153>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDO2WJYCYMLJN7GZTNRRDQPI3IHANCNFSM4JCLOTOQ>
.
|
I think it's a broadcasting operation causing the issue. The example in #56 also fails for me, so there may have been an inference regression on this. |
Here's a simpler function where inference fails: @inferred Cassette.overdub(Ctx(), x -> (x.+x)[1], [8,9,99]) |
I can follow the path of inference failures with Cthulhu, but I don't know why it's failing. |
There is a broadcast test, and it is failing for me. |
These seem to infer fine on Julia v1.2.0, so something changed with broadcasting since then. |
Thanks I will have a look at it. |
The following infers with Julia v1.2.0 and v1.4.0-DEV.666 (2019-12-26), but in doesn't infer with Julia v1.3.0. using Cassette: @context, overdub
using Test
@context Ctx;
@inferred overdub(Ctx(), x -> (x.+x)[1], [8,9,99]) Currently, Cassette's tests don't pass on Julia v1.3.0. Does that mean that "full" Cassette support will skip v1.3.0? I mainly ask because its an unusual situation where Cassette is at the mercy of base-Julia changes. Edit: this also fails to infer in Julia v1.3.1. |
Can this issue be retitled sinmce as the MWEs demonstrate this is not restricted to bitarry ? |
for me it fails to infer in: We can even go slightly simpler:
|
That passes for me on (on Cassette master):
|
Here are my version infos:
Possibilities:
|
Digging down into it Something close to metal that fails
And if we look at the
Whereas in Julia 1.2
|
Digging into that with Cthulhu shows that a failure to infer |
@tshort can you test that this helps your use-case? |
With Julia v1.3.1 and Cassette master, the following both infer fine now!
|
@oxinabox, does that fix your tests, too? |
Working on 1.3. 🎉 |
I'm not sure if this is a repeat.
The following function infers fine:
I tried it on Cassette master and v0.2.6. This is on Julia v1.3.0-rc3.0 on Linux. I'm not sure how to debug inference issues.
The text was updated successfully, but these errors were encountered: