David Widmann
David Widmann
Or simpler: If you do not go through Distributions but define the logpdf directly as a separate function and broadcast that one?
I guess, for debugging it could also be useful to inspect the tape that ReverseDiff creates with the different implementations.
The logpdf in your last comment is wrong though, isn't it? At least it doesn't match the one discussed above.
https://github.com/TuringLang/Turing.jl/issues/1934#issuecomment-1377574540 doesn't matter either?
Yeah, broadcasting performance issues and gotchas are about the worst... Countless hours that went into these things in the SciML ecosystem as well.
The usual workflow I experienced was that someone notices performance issues and then one starts debugging and finally notices that's broadcasting related (e.g., there was (is?) also a limit after...
> When using restructure the Chain parameters are Float32 but the θ is Float64. The `Float32` are a Flux-specific thing, they work mainly with `Float32` and even started to enforce...
One (main?) factor contributing to the ReverseDiff timings might be https://github.com/JuliaDiff/ReverseDiff.jl/issues/226.
The PR can't be merged? "This branch has conflicts that must be resolved" and tests are failing.
I wasn't involved in the previous discussions in #671 and https://github.com/JuliaStats/StatsBase.jl/pull/814, but my impression was that the errors are intentional and the previous behaviour (no errors) was considered a bug....