Closed MilesCranmer closed 1 year ago
There is a lot of noise here because of formatting, but it should fix this issue: https://github.com/JuliaSIMD/SLEEFPirates.jl/commit/a64124aa8c1e3b4afde5183ea1937e1487243570#commitcomment-114228763
The new rule for cos calling sincos
may have been the issue?
[5] sincos
@ ~/.julia/packages/SLEEFPirates/Io8eB/src/SLEEFPirates.jl:202 [inlined]
[6] rrule(#unused#::typeof(cos), x::VectorizationBase.VecUnroll{1, 1, Float64, Float64})
The type VectorizationBase.VecUnroll{1, 1, Float64, Float64}
represents unrolling without vectorization, which is perhaps a little uncommon, and apparently was untested for sincos
.
The SLEEFPirates commit above adds support for sincos
; that this was missing was simply an oversight.
Please try with SLEEFPirates 0.6.39 and confirm this fixes your problem.
Amazing turnaround time! Thanks so much. Confirmed it fixes it.
I'm seeing a new issue in the DynamicExpressions.jl (and thus SymbolicRegression.jl/PySR) unit tests which seems to be coming from a vectorized Zygote kernel. My unit tests haven't changed but I started seeing this issue in the last ~1-2 weeks or so.
Here is the traceback:
It seems to be from the gradient of the expression
tree = (((pow_abs2(x1, x2) + x3) + custom_cos(1.0 + x3)) + (3.0 / x1))
in my unittests here.I think what is happening is I am using Zygote to create a function for the derivative of
cos
, and then using that function within a@turbo
loop (it sees the function at compile time). This hasn't given me issues before for other functions so I think there is something new happening.The actual loop in question is here: https://github.com/SymbolicML/DynamicExpressions.jl/blob/71a7b581a9ec203232fb99359841765b4082343c/src/EvaluateEquationDerivative.jl#L331-L338
I can isolate this if needed. Let me know what other info I should include. Maybe it's related to a new Zygote update rather than an update in the SIMD libraries?