-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
PHI nodes not grouped at top of basic block!
when testing some packages
#50448
Labels
regression
Regression in behavior compared to a previous version
upstream
The issue is with an upstream dependency, e.g. LLVM
Milestone
Comments
KristofferC
added
regression
Regression in behavior compared to a previous version
compiler:codegen
Generation of LLVM IR and native code
labels
Jul 7, 2023
Bisected to #49798 (cc @pchintalapudi). I'm looking into reducing to an MWE, but there's quite some code involved with these packages. |
Reduced to: using LinearAlgebra
Base.:*(x, partials) = scale_tuple(partials, x)
tupexpr(f, N) = Expr(:tuple, [f(i) for i=1:N]...)
@generated function scale_tuple(tup::NTuple{N}, x) where N
tupexpr(i -> :(tup[$i] * x), N)
end
struct Dual{V,N}
value::V
partials::NTuple{N,V}
end
Dual(value, partials::NTuple{N,V}) where {N,V} = Dual{V,N}(value, partials)
Base.:*(x, y::Dual) = Dual(x * y.value, x * y.partials)
Base.:\(x, y::Dual) = Dual(x \ y.value, one(y.value) / x * y.partials)
Base.:-(:, y) = y
struct PDMat{T} <: AbstractMatrix{T} end
Base.size(PDMat) = (adim, adim)
function logdensity_and_gradient(ℓ, x)
duals = Dual{Float64,10}[]
cholesky(ℓ).factors' \ duals
end
phasepoint(h, θ::T) where T<:AbstractVector = h(θ)
find_good_stepsize(h, θ) = phasepoint(h, θ)
sig = Tuple{typeof(find_good_stepsize), Base.Fix1{typeof(logdensity_and_gradient), PDMat{Float64}}, Array{Float64}}
CC = Core.Compiler
world = Base.get_world_counter()
match, = CC._findsup(sig, nothing, world)
mi = CC.specialize_method(match)
ccall(:jl_compile_method_internal, Any, (Any, UInt), mi, world) Run with LLVM assertions enabled, and
|
This is not actually our fault, this is llvm/llvm-project#60649, fixed by llvm/llvm-project@af39acd, which we should backport. cc @vchuravy |
pchintalapudi
added
upstream
The issue is with an upstream dependency, e.g. LLVM
and removed
compiler:codegen
Generation of LLVM IR and native code
labels
Jul 14, 2023
maleadt
added a commit
that referenced
this issue
Jul 23, 2023
KristofferC
pushed a commit
that referenced
this issue
Jul 24, 2023
- llvm/llvm-project@af39acd closing #50448 - https://reviews.llvm.org/D139078 closing #49907 (cherry picked from commit 092231c)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
regression
Regression in behavior compared to a previous version
upstream
The issue is with an upstream dependency, e.g. LLVM
When running the tests for
"DistributionsAD"
"AdvancedHMC"
"Pathfinder"
with assertions enabled they error with
Example PkgEval log: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/c9a32f4_vs_e4ee485/DistributionsAD.primary.log
The text was updated successfully, but these errors were encountered: