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

Gradient with respect to r gives error #85

Open
tsfloss opened this issue Oct 3, 2023 · 1 comment · May be fixed by #87
Open

Gradient with respect to r gives error #85

tsfloss opened this issue Oct 3, 2023 · 1 comment · May be fixed by #87

Comments

@tsfloss
Copy link
Contributor

tsfloss commented Oct 3, 2023

When trying to compute the gradient of the logpdf with respect to r (A\phi works just fine), I get and error.
This problem then propagates to the sample_joint function as well.

e.g.:

(;f, f̃, ϕ, ds) = load_sim(
    seed = 2,
    storage=CuArray,
    fiducial_θ = (Aϕ=1.,r=0.04),
    μKarcminT=1., ℓknee=100., αknee = 3.,
    θpix = 2.,
    T = Float32,
    Nside = 256,
    pol = :IP,
    beamFWHM = 2.,
    bandpass_mask = LowPass(5000),
    pixel_mask_kwargs = (;apodization_deg=0.6,edge_padding_deg=0.4,num_ptsrcs=0)
)

(;Cf, Cϕ) = ds;

gradient(r -> logpdf(ds; f, ϕ, θ=(;r)), .05)

results in and error:

CanonicalIndexError: getindex not defined for BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}

Stacktrace:
  [1] error_if_canonical_getindex(::IndexCartesian, ::BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, ::Int64, ::Int64)
    @ Base ./abstractarray.jl:1313
  [2] getindex
    @ ./abstractarray.jl:1293 [inlined]
  [3] _getindex
    @ ./abstractarray.jl:1344 [inlined]
  [4] getindex
    @ ./abstractarray.jl:1294 [inlined]
  [5] iterate
    @ ./abstractarray.jl:1220 [inlined]
  [6] iterate
    @ ./abstractarray.jl:1218 [inlined]
  [7] dot(x::ChainRulesCore.Tangent{Any, NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Any, 2, Matrix{Any}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, y::BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}})
    @ LinearAlgebra /cvmfs/hpc.rug.nl/versions/2023.01/rocky8/x86_64/amd/zen3/software/Julia/1.9.2-linux-x86_64/share/julia/stdlib/v1.9/LinearAlgebra/src/generic.jl:849
  [8] (::ChainRules.var"#1499#1503"{ChainRulesCore.Tangent{Any, NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Any, 2, Matrix{Any}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, ChainRulesCore.ProjectTo{Float32, NamedTuple{(), Tuple{}}}})()
    @ ChainRules ~/.julia/packages/ChainRules/nnaVO/src/rulesets/Base/arraymath.jl:108
  [9] unthunk
    @ ~/.julia/packages/ChainRulesCore/0t04l/src/tangent_types/thunks.jl:204 [inlined]
 [10] wrap_chainrules_output
    @ ~/.julia/packages/Zygote/XJ8pP/src/compiler/chainrules.jl:110 [inlined]
 [11] map(f::typeof(Zygote.wrap_chainrules_output), t::Tuple{ChainRulesCore.NoTangent, ChainRulesCore.Thunk{ChainRules.var"#1499#1503"{ChainRulesCore.Tangent{Any, NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Any, 2, Matrix{Any}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, ChainRulesCore.ProjectTo{Float32, NamedTuple{(), Tuple{}}}}}, ChainRulesCore.InplaceableThunk{ChainRulesCore.Thunk{ChainRules.var"#1501#1505"{ChainRulesCore.Tangent{Any, NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Any, 2, Matrix{Any}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, Float32, ChainRulesCore.ProjectTo{BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, NamedTuple{(), Tuple{}}}}}, ChainRules.var"#1500#1504"{ChainRulesCore.Tangent{Any, NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Any, 2, Matrix{Any}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, Float32}}})
    @ Base ./tuple.jl:275
 [12] wrap_chainrules_output
    @ ~/.julia/packages/Zygote/XJ8pP/src/compiler/chainrules.jl:111 [inlined]
 [13] ZBack
    @ ~/.julia/packages/Zygote/XJ8pP/src/compiler/chainrules.jl:211 [inlined]
 [14] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/dataset.jl:273 [inlined]
 [15] (::Zygote.Pullback{Tuple{CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, Float64, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, CMBLensing.var"#847#861"{CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, Float32}}, Tuple{Zygote.ZBack{Zygote.var"#Real_pullback#332"}, Zygote.ZBack{ChainRules.var"#times_pullback#1502"{Float32, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, ChainRulesCore.ProjectTo{BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float32, NamedTuple{(), Tuple{}}}}}, Zygote.var"#3621#back#1098"{Zygote.var"#1094#1097"}, Zygote.ZBack{ChainRules.var"#/_pullback#1340"{Float32, Float32, ChainRulesCore.ProjectTo{Float32, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float32, NamedTuple{(), Tuple{}}}}}, Zygote.var"#2184#back#303"{Zygote.var"#back#302"{:r₀, Zygote.Context{false}, CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, Float32}}, Zygote.var"#2184#back#303"{Zygote.var"#back#302"{:Cft, Zygote.Context{false}, CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}}}, Zygote.var"#2184#back#303"{Zygote.var"#back#302"{:T, Zygote.Context{false}, CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, DataType}}, Zygote.var"#2184#back#303"{Zygote.var"#back#302"{:Cfs, Zygote.Context{false}, CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}}}}})(Δ::NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}, 2, Matrix{Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}})
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [16] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/dataset.jl:273 [inlined]
 [17] (::Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:r,), Tuple{Float64}}, CMBLensing.var"#847#861"{CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, Float32}}, Any})(Δ::NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}, 2, Matrix{Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}})
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [18] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/specialops.jl:315 [inlined]
 [19] (::Zygote.Pullback{Tuple{ParamDependentOp{Float32, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, CMBLensing.var"#847#861"{CMBLensing.var"#847#848#862"{DataType, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, BlockDiagIEB{ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}, Diagonal{Float32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, Float32, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}}}, Float32}, Float32}}, NamedTuple{(:r,), Tuple{Float64}}}, Any})(Δ::NamedTuple{(:ΣTE, :ΣB), Tuple{StaticArraysCore.SizedMatrix{2, 2, Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}, 2, Matrix{Union{Nothing, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}, Diagonal{ComplexF32, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}})
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [20] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/dataset.jl:61 [inlined]
 [21] (::Zygote.Pullback{Tuple{CMBLensing.var"##_#834", BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}, BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseDataSet, CMBLensing.Logpdf, Base.RefValue{Real}}, Any})(Δ::Nothing)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [22] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/dataset.jl:59 [inlined]
 [23] (::Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, BaseDataSet, CMBLensing.Logpdf, Base.RefValue{Real}}, Any})(Δ::Nothing)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [24] #291
    @ ~/.julia/packages/Zygote/XJ8pP/src/lib/lib.jl:206 [inlined]
 [25] (::Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{NTuple{4, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, BaseDataSet, CMBLensing.Logpdf, Base.RefValue{Real}}, Any}}})(Δ::Nothing)
    @ Zygote ~/.julia/packages/ZygoteRules/OgCVT/src/adjoint.jl:71
 [26] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/simpleppl.jl:96 [inlined]
 [27] (::Zygote.Pullback{Tuple{CMBLensing.var"##loglikelihood#814", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(StatsAPI.loglikelihood), BaseDataSet}, Any})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [28] #291
    @ ~/.julia/packages/Zygote/XJ8pP/src/lib/lib.jl:206 [inlined]
 [29] #2173#back
    @ ~/.julia/packages/ZygoteRules/OgCVT/src/adjoint.jl:71 [inlined]
 [30] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/simpleppl.jl:94 [inlined]
 [31] (::Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, typeof(StatsAPI.loglikelihood), BaseDataSet}, Tuple{Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{CMBLensing.var"##loglikelihood#814", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(StatsAPI.loglikelihood), BaseDataSet}, Any}}}, Zygote.var"#2370#back#419"{Zygote.var"#pairs_namedtuple_pullback#418"{(:f, :ϕ, :θ), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}}}})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [32] #291
    @ ~/.julia/packages/Zygote/XJ8pP/src/lib/lib.jl:206 [inlined]
 [33] (::Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, typeof(StatsAPI.loglikelihood), BaseDataSet}, Tuple{Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{CMBLensing.var"##loglikelihood#814", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(StatsAPI.loglikelihood), BaseDataSet}, Any}}}, Zygote.var"#2370#back#419"{Zygote.var"#pairs_namedtuple_pullback#418"{(:f, :ϕ, :θ), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}}}}}})(Δ::Float32)
    @ Zygote ~/.julia/packages/ZygoteRules/OgCVT/src/adjoint.jl:71
 [34] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/simpleppl.jl:100 [inlined]
 [35] (::Zygote.Pullback{Tuple{CMBLensing.var"##logpdf#815", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(logpdf), BaseDataSet}, Any})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [36] #291
    @ ~/.julia/packages/Zygote/XJ8pP/src/lib/lib.jl:206 [inlined]
 [37] #2173#back
    @ ~/.julia/packages/ZygoteRules/OgCVT/src/adjoint.jl:71 [inlined]
 [38] Pullback
    @ ~/PhD/CMB-delensing/CMBLensing.jl/src/simpleppl.jl:99 [inlined]
 [39] (::Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, typeof(logpdf), BaseDataSet}, Tuple{Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{CMBLensing.var"##logpdf#815", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(logpdf), BaseDataSet}, Any}}}, Zygote.var"#2370#back#419"{Zygote.var"#pairs_namedtuple_pullback#418"{(:f, :ϕ, :θ), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}}}})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [40] Pullback
    @ ./In[14]:17 [inlined]
 [41] (::Zygote.Pullback{Tuple{var"#3#4", Float64}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:f, :ϕ, :θ)}}, Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Tuple{Zygote.var"#2224#back#315"{Zygote.Jnew{NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Nothing, true}}}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseDataSet}}, Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.Pullback{Tuple{Type{NamedTuple{(:r,)}}, Tuple{Float64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:r,), Tuple{Float64}}}, Tuple{Float64}}, Tuple{Zygote.var"#2224#back#315"{Zygote.Jnew{NamedTuple{(:r,), Tuple{Float64}}, Nothing, true}}}}}}, Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, typeof(logpdf), BaseDataSet}, Tuple{Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{CMBLensing.var"##logpdf#815", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(logpdf), BaseDataSet}, Any}}}, Zygote.var"#2370#back#419"{Zygote.var"#pairs_namedtuple_pullback#418"{(:f, :ϕ, :θ), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface2.jl:0
 [42] (::Zygote.var"#75#76"{Zygote.Pullback{Tuple{var"#3#4", Float64}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:f, :ϕ, :θ)}}, Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Tuple{Zygote.var"#2224#back#315"{Zygote.Jnew{NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, Nothing, true}}}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseDataSet}}, Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.Pullback{Tuple{Type{NamedTuple{(:r,)}}, Tuple{Float64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:r,), Tuple{Float64}}}, Tuple{Float64}}, Tuple{Zygote.var"#2224#back#315"{Zygote.Jnew{NamedTuple{(:r,), Tuple{Float64}}, Nothing, true}}}}}}, Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(Core.kwcall), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}, typeof(logpdf), BaseDataSet}, Tuple{Zygote.var"#2017#back#204"{typeof(identity)}, Zygote.var"#2173#back#293"{Zygote.var"#291#292"{Tuple{Tuple{Nothing, Nothing, Nothing}, Tuple{}}, Zygote.Pullback{Tuple{CMBLensing.var"##logpdf#815", Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}, typeof(logpdf), BaseDataSet}, Any}}}, Zygote.var"#2370#back#419"{Zygote.var"#pairs_namedtuple_pullback#418"{(:f, :ϕ, :θ), NamedTuple{(:f, :ϕ, :θ), Tuple{BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}, NamedTuple{(:r,), Tuple{Float64}}}}}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseField{Fourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 2, CUDA.Mem.DeviceBuffer}}}}, Zygote.var"#1990#back#194"{Zygote.var"#190#193"{Zygote.Context{false}, GlobalRef, BaseField{IEBFourier, ProjLambert{Float32, CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}, CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}}, ComplexF32, CuArray{ComplexF32, 3, CUDA.Mem.DeviceBuffer}}}}}}})(Δ::Float32)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface.jl:45
 [43] gradient(f::Function, args::Float64)
    @ Zygote ~/.julia/packages/Zygote/XJ8pP/src/compiler/interface.jl:97
 [44] top-level scope
    @ In[14]:17
@tsfloss
Copy link
Contributor Author

tsfloss commented Oct 3, 2023

It seems to be a problem of including Temperature (pol=:IP), because the gradient does work for pol=:P

@marius311 marius311 linked a pull request Oct 5, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant