You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Master CI is red on the julia 1 (= 1.12.6) and julia pre channels (Core test set), across ubuntu/macos/windows. The julia lts (1.10) channel is green. The failing test is test/DeepBSDE.jl and it does not fail with an assertion — it segfaults (Package HighDimPDE errored during testing (received signal: 11), process exit 139).
I reproduced this locally on Julia 1.12.6 (the exact channel CI runs as "julia 1"):
$ julia +1.12.6 --project=. -e 'include("test/DeepBSDE.jl")'
DeepBSDE_tests
DeepBSDE
[----] signal 11 (1): Segmentation fault
in expression starting at .../test/DeepBSDE.jl:19
emit_unboxed_coercion at src/intrinsics.cpp:394 [inlined]
emit_unbox at src/intrinsics.cpp:458
emit_condition at src/codegen.cpp:6089
emit_function at src/codegen.cpp:9294
jl_emit_code ...
...
∇responsible_map at SciMLBase/ext/SciMLBaseZygoteExt.jl:332 [inlined]
adjoint at SciMLBase/ext/SciMLBaseZygoteExt.jl:373 [inlined]
solve_batch at SciMLBase/src/ensemble/basic_ensemble_solve.jl:496
...
neural_sde at src/DeepBSDE.jl:157 [inlined]
loss_n_sde at src/DeepBSDE.jl:185 [inlined]
gradient at Zygote/.../interface.jl:156
solve at src/DeepBSDE.jl:193
EXIT=139
Root cause (verified)
The crash is inside Julia 1.12.6's LLVM codegen (emit_unboxed_coercion → emit_unbox → emit_condition), while compiling the Zygote reverse-pass closure for SciMLBase's ensemble adjoint (SciMLBaseZygoteExt.∇responsible_map). DeepBSDE differentiates an EnsembleProblem solve via Flux.gradient / TrackerAdjoint, and that pullback is what 1.12.6 fails to compile.
This is not a HighDimPDE bug. I reduced it to a ~50-line MWE with no HighDimPDE code (only Flux + Zygote + StochasticDiffEq + SciMLBase/SciMLSensitivity + an EnsembleProblem) and it segfaults identically, in the same ∇responsible_map codegen.
Julia core has already triaged this exact emit_unboxed_coercion/emit_condition signature as Zygote emitting invalid LLVM IR, not a Julia bug:
MWE (segfaults on Julia 1.12.6, no HighDimPDE code)
click to expand
using Flux, Zygote
import StochasticDiffEq
using LinearAlgebra
using SciMLBase, SciMLSensitivity
import Tracker
d =1; tspan = (0.0f0, 5.0f0); dt =0.5f0; x0 = Float32[11.0]
net = Flux.Chain(Dense(d +1, 11, relu), Dense(11, d))
p2, re2 = Flux.destructure(net); p3 =copy(p2); ps = Flux.params(p3)
μ(X, p, t) = X *0.0f0σ(X, p, t) =Matrix(Diagonal(ones(eltype(X), d)))
functionF(h::Tracker.TrackedArray, p, t)
X = h[1:(end-1)].data; t_ =eltype(X)(t); re2(p)([X; t_])'|> collect
return Tracker.TrackedArray(vcat(μ(X, p, t), [eltype(X)(0.0)]))
endfunctionG(h::Tracker.TrackedArray, p, t)
X = h[1:(end-1)].data; t_ =eltype(X)(t); s =re2(p)([X; t_])'|> collect
return Tracker.TrackedArray(vcat(σ(X, p, t), s))
end
noise =zeros(Float32, d +1, d)
sde_prob =SDEProblem{false}(F, G, [x0; 0.0f0], tspan, p3, noise_rate_prototype = noise)
functionneural_sde(ic)
sol =solve(EnsembleProblem(remake(sde_prob, u0 = ic)), StochasticDiffEq.EM(), EnsembleSerial();
u0 = ic, trajectories =5, dt = dt, p = p3,
sensealg = SciMLSensitivity.TrackerAdjoint(), save_everystep =false)
arr =Array(sol); return [arr[:, end, i] for i inaxes(arr, 3)]
endloss() =sum(sum(abs2, pr) for pr inneural_sde([x0; 0.0f0]))
gs = Flux.gradient(ps) do; loss(); end# SIGSEGV in ∇responsible_map codegen
Status / options
This needs an upstream fix — it cannot be correctly fixed inside HighDimPDE without a fragile, unverified workaround around a compiler/Zygote-IR bug. Realistic paths:
Summary
Master CI is red on the
julia 1(= 1.12.6) andjulia prechannels (Core test set), across ubuntu/macos/windows. Thejulia lts(1.10) channel is green. The failing test istest/DeepBSDE.jland it does not fail with an assertion — it segfaults (Package HighDimPDE errored during testing (received signal: 11), process exit 139).I reproduced this locally on Julia 1.12.6 (the exact channel CI runs as "julia 1"):
Root cause (verified)
The crash is inside Julia 1.12.6's LLVM codegen (
emit_unboxed_coercion→emit_unbox→emit_condition), while compiling the Zygote reverse-pass closure for SciMLBase's ensemble adjoint (SciMLBaseZygoteExt.∇responsible_map). DeepBSDE differentiates anEnsembleProblemsolve viaFlux.gradient/TrackerAdjoint, and that pullback is what 1.12.6 fails to compile.This is not a HighDimPDE bug. I reduced it to a ~50-line MWE with no HighDimPDE code (only Flux + Zygote + StochasticDiffEq + SciMLBase/SciMLSensitivity + an
EnsembleProblem) and it segfaults identically, in the same∇responsible_mapcodegen.Julia core has already triaged this exact
emit_unboxed_coercion/emit_conditionsignature as Zygote emitting invalid LLVM IR, not a Julia bug:Versions (all latest released)
MWE (segfaults on Julia 1.12.6, no HighDimPDE code)
click to expand
Status / options
This needs an upstream fix — it cannot be correctly fixed inside HighDimPDE without a fragile, unverified workaround around a compiler/Zygote-IR bug. Realistic paths:
∇responsible_mapensemble pullback on 1.12 (Assertion errors on IR verification on upcoming 1.12 FluxML/Zygote.jl#1580 follow-up), orresponsible_mapensemble adjoint avoids the closure pattern Zygote miscompiles, orFiling as the tracking issue for the master CI red. I can test candidate upstream fixes locally on 1.12.6.
cc @ChrisRackauckas