-
Notifications
You must be signed in to change notification settings - Fork 34
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
Type stability of KernelSum
#458
Comments
What's a possible workaround? Can we just change
to function (κ::KernelSum)(x, y)
return sum(κ.kernels) do k
return k(x, y)
end
end etc.? |
I'll double-check, but I think I tried that and it did not solve the issue. I think I'll use the |
Maybe one has to add a |
Hmm, seemed to be a false alarm. The issue is that many things seem to work if the function is redefined after module import, but not in a new Julia session immediately after precompilation. |
@simsurace can we close this now? |
Sure. It should have been linked to #459 I guess, but it doesn't get linked automatically when non-admins use the closing keywords. |
but e.g.
Similar results hold for
kernelmatrix
andkernelmatrix_diag
.I haven't figured out why certain kernels show the problem while others don't.
This may be a variant of JuliaLang/julia#45748 and could be a Julia issue.
The similarity to the referenced Julia issue is that calling
sum
before affects type inference:Despite this probably being a Julia issue, we may want to patch it anyways, as it can adversely impact AD for certain GP models.
I'll open a PR.
The text was updated successfully, but these errors were encountered: