-
-
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
Backports for julia 1.8.0-beta2 #44324
Conversation
Hmm, that |
@simeonschaub clarifies that the warnings aren't serious, so that's unlikely to be the cause. Looking at the log, it might have failed in precompile simply due to a timeout. That's consistent with #44338, which will be fixed by #44345. |
@nanosoldier |
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. |
Prior to this PR, Julia's precompiled `*.ji` files saved just two categories of code: unspecialized method definitions and type-specialized code for the methods defined by the package. Any novel specializations of methods from Base or previously-loaded packages were not saved, and therefore effectively thrown away. This PR caches all the code---internal or external---called during package definition that hadn't been previously inferred, as long as there is a backedge linking it back to a method owned by a module being precompiled. (The latter condition ensures it will actually be called by package methods, and not merely transiently generated for the purpose of, e.g., metaprogramming or variable initialization.) This makes precompilation more intuitive (now it saves all relevant inference results), and substantially reduces latency for inference-bound packages. Closes #42016 Fixes #35972 Issue #35972 arose because codegen got started without re-inferring some discarded CodeInstances. This forced the compiler to insert a `jl_invoke`. This PR fixes the issue because needed CodeInstances are no longer discarded by precompilation. (cherry picked from commit df81bf9)
(cherry-picked from 675911a)
(cherry picked from commit 627016a)
(cherry picked from commit ac922b0)
…44274) Co-authored-by: Johnny Chen <[email protected]> (cherry picked from commit 9c0e5b0d186ea95a06d5b0bdc4bc19d1a17b444d) (cherry picked from commit aa2421d)
(cherry picked from commit 6850940)
(cherry picked from commit f20d5de)
Because we're starting to distribute macOS tarballs as well, let's codesign them by default, when possible. (cherry picked from commit 6b29ebd)
…et (#44262) We collect the relocations (i.e. the GOT slots that is used in the code) for each target in `tgt.relocs`. Needing a relocation, however, does not imply that the function is cloned for this target within the group (It does mean that at least one target in the group has it cloned). The previous version would miss the relocation in this case. This was triggerred with the following cloning situation caller: clone_1 callee: clone_1, clone_1.clone_3 Since caller.clone_1 may call either callee.clone_1 or callee.clone_1.clone_3 a relocation for callee will be used and is required to be initialized. In addition to target 1, target 2 (and in fact target 3) within group 1 will also use caller.clone_1. However, since callee isn't cloned for target 2 the previous version wouldn't have saved this slot in the relocation array. (cherry picked from commit 76fc067)
I believe it's intentional that for these methods, the `sig` field is just ignored and always set to `Tuple`. Also fixes a lowering bug I discovered that would cause errors if `Union` was shadowed. I have verified that this fixes the reported warnings. Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit 5deb503)
`vendor()` returns `:lbt` `libblas_name` and `liblapack_name` are set to "libblastrampoline" (cherry picked from commit bf6d9de)
* Clarify the behavior of `@threads for` Co-authored-by: Ian Butterworth <[email protected]> (cherry picked from commit 2f67b51)
* fix errors Co-authored-by: Simeon Schaub <[email protected]> (cherry picked from commit a9d8c85)
…4416) Intersection cannot deal with this `metharg`, so it does not simplify the type at all when handling this case. This can cause us to run into an assertion later, where we assume the intersection of a non-Varags type will always return a simple DataType without Varargs. Fixes #44238 atype = Tuple{typeof(Base.similar), Tuple{Union{Polyhedra.Polyhedron{T}, Polyhedra.Representation{T}} where T}, Array{_A, 1} where _A, Array{_C, 1} where _C, Array{_B, 1} where _B} metharg = Tuple{typeof(Base.similar), Tuple{Vararg{Union{Polyhedra.Polyhedron{T}, Polyhedra.Representation{T}} where T}}, Vararg{Union{Union{AbstractArray{var"#s14", 1}, Polyhedra.AbstractRepIterator{var"#s13", var"#s14"} where var"#s13", Polyhedra.AllRepIterator{var"#s14", var"#s14", LinElemT, LRT, RT} where RT<:Polyhedra.AbstractRepIterator{var"#s14", var"#s14"} where LRT<:Polyhedra.AbstractRepIterator{var"#s14", LinElemT} where LinElemT where var"#s14"} where var"#s14"<:(Polyhedra.HyperPlane{T, AT} where AT<:AbstractArray{T, 1}), Union{AbstractArray{var"#s14", 1}, Polyhedra.AbstractRepIterator{var"#s13", var"#s14"} where var"#s13", Polyhedra.AllRepIterator{var"#s14", var"#s14", LinElemT, LRT, RT} where RT<:Polyhedra.AbstractRepIterator{var"#s14", var"#s14"} where LRT<:Polyhedra.AbstractRepIterator{var"#s14", LinElemT} where LinElemT where var"#s14"} where var"#s14"<:(Polyhedra.HalfSpace{T, AT} where AT<:AbstractArray{T, 1}), Union{AbstractArray{var"#s14", 1}, Polyhedra.AbstractRepIterator{var"#s13", var"#s14"} where var"#s13", Polyhedra.AllRepIterator{var"#s14", var"#s14", LinElemT, LRT, RT} where RT<:Polyhedra.AbstractRepIterator{var"#s14", var"#s14"} where LRT<:Polyhedra.AbstractRepIterator{var"#s14", LinElemT} where LinElemT where var"#s14"} where var"#s14"<:AbstractArray{T, 1}, Union{AbstractArray{var"#s14", 1}, Polyhedra.AbstractRepIterator{var"#s13", var"#s14"} where var"#s13", Polyhedra.AllRepIterator{var"#s14", var"#s14", LinElemT, LRT, RT} where RT<:Polyhedra.AbstractRepIterator{var"#s14", var"#s14"} where LRT<:Polyhedra.AbstractRepIterator{var"#s14", LinElemT} where LinElemT where var"#s14"} where var"#s14"<:(Polyhedra.Line{T, AT} where AT<:AbstractArray{T, 1}), Union{AbstractArray{var"#s14", 1}, Polyhedra.AbstractRepIterator{var"#s13", var"#s14"} where var"#s13", Polyhedra.AllRepIterator{var"#s14", var"#s14", LinElemT, LRT, RT} where RT<:Polyhedra.AbstractRepIterator{var"#s14", var"#s14"} where LRT<:Polyhedra.AbstractRepIterator{var"#s14", LinElemT} where LinElemT where var"#s14"} where var"#s14"<:(Polyhedra.Ray{T, AT} where AT<:AbstractArray{T, 1})} where T}} Currently `typeintersection(atype, metharg) === metharg` (cherry picked from commit ffc5ffa)
This reverts commit e54b04a.
(cherry picked from commit d971465)
Co-authored-by: Gerhard Aigner <[email protected]> Co-authored-by: Jameson Nash <[email protected]> (cherry picked from commit c6b5fa2)
Since we couldn't confirm any performance benefit from `CachedMethodTable` in the current infrastructure (see the benchmark results in #44240), now I'd like to propose to eliminate that entirely and save a bit of space.
…InferenceState)` interface (#44389) In #44240 we removed the `CachedMethodTable` support as it turned out to be ineffective under the current compiler infrastructure. Because of this, there is no strong reason to keep a method table per `InferenceState`. This commit simply removes the `method_table(::AbstractInterpreter, ::InferenceState)` interface and should make it clearer which interface should be overloaded to implement a contextual dispatch.
#44511) - respect world range of failed lookup into `OverlayMethodTable`: <#44448 (comment)> - fix calculation of merged valid world range: <#44448 (comment)> - make `findsup` return valid `WorldRange` unconditionally, and enable more strict world validation within `abstract_invoke`: <#44448 (comment)> - fix the default `limit::Int` value of `findall`
*fix negative numbers to powers >2^64 (cherry picked from commit 03433a2)
(cherry picked from commit 02abca3)
There appeared to be a possibility they could race and the data field might already be destroyed before we reached the close callback, from looking at the state of the program when reproducing #44460. This is because the uv_return_spawn set the handle to NULL, which later can cause the uvfinalize to exit early (if the finalizer gets run on another thread, since we have disabled finalizers on our thread). Then the GC can reap the julia Process object prior to uv_close cleaning up the object. We solve this by calling disassociate_julia_struct before dropping the reference to the handle. But then we also fully address any remaining race condition by having uvfinalize acquire a lock also. The uv_return_spawn callback also needs to be synchronized with the constructor, since we might have arrived there before we finished allocating the Process struct here, leading to missed exit events. Fixes #44460 (cherry picked from commit c591bf2)
The main difference since previous version should be the libraries for aarch64-apple-darwin, which are based on a more recent version of the GCC fork for this platform. There are a couple of notable ABI changes here: * `libgcc_s` is now called `libgcc_s.1.1.dylib` instead of `libgcc_s.2.dylib` * there is now `libquadmath.0.dylib` for this platform, which was missing before. (cherry picked from commit cb2fa5d)
(cherry picked from commit cd704d2)
@nanosoldier |
(cherry picked from commit 45ab664)
Your package evaluation job has completed - possible new issues were detected. A full report can be found here. |
* improve accuracy for x^-3 (cherry picked from commit 258ddc0)
(cherry picked from commit f5d1557)
(cherry picked from commit e6c1525)
* inference: fix tmerge lattice over issimpleenoughtype Previously we assumed only union type could have complexity that violated the tmerge lattice requirements, but other types can have that too. This lets us fix an issue with the PartialStruct comparison failing for undefined fields, mentioned in #43784. * inference: refine PartialStruct lattice tmerge Be more aggressive about merging fields to greatly accelerate convergence, but also compute anyrefine more correctly as we do now elsewhere (since #42831, a121721) Move the tmeet algorithm, without changes, since it is a precise lattice operation, not a heuristic limit like tmerge. Close #43784 (cherry picked from commit ff88fa4)
(cherry picked from commit 8c4ff55)
…4561) The PR #43852 missed to implement the mechanism to override analyzed effects with effect settings annotated by `Base.@assume_effects`. This commits adds such an mechanism within `finish(::InferenceState, ::AbstractInterpreter)`, just after inference analyzed frame effect. Now we can do something like: ```julia Base.@assume_effects :consistent :effect_free :terminates_globally consteval( f, args...; kwargs...) = f(args...; kwargs...) const ___CONST_DICT___ = Dict{Any,Any}(:a => 1, :b => 2) @test fully_eliminated() do consteval(getindex, ___CONST_DICT___, :a) end ```
`AbstractInterpreter`: enable selective concrete-evaluation for external `AbstractInterpreter` with overlayed method table
CI is not great here (which is the same as master) but all these commits have already had a full CI run on them and the failures here are known and it is "just" a beta that we really need to get out so I will merge this nonetheless. |
Backported PRs:
range(start; step, length)
uses TwicePrecision when possible #44313NamedTuple
can be bitstype more often #44311@threads for
#44168threaded loop executed in order
test warning #44479@_inline_meta
#44516range
usesTwicePrecision
when possible (part 2) #44528CachedMethodTable
#44240AbstractInterpreter
: removemethod_table(::AbstractInterpreter, ::InferenceState)
interface #44389AbstractInterpreter
: implementfindsup
forOverlayMethodTable
#44448findall
/findsup
forOverlayMethodTable
#44511@inline/@noinline
annotations #44608AbstractInterpreter
: enable selective pure/concrete eval for externalAbstractInterpreter
with overlayed method table #44515tmeet
definition #44617Contains multiple commits, manual intervention needed:
Non-merged PRs with backport label:
gfortran: command not found
errors #44554strides
forReshapedArray
with strided parent. #44507