forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 2
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
[pull] master from JuliaLang:master #1813
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…s` (#54752) The implementation can be slightly more simply.
Closes #53854. After talking with @vtjnash, we are ready to commit to the `GenericMemory` interface. Sorry @nsajko that this took me so long to get around to. --------- Co-authored-by: Marek Kaluba <[email protected]> Co-authored-by: Neven Sajko <[email protected]>
We changed the default number of GC threads in #53608 but didn't update the man page and docs. I think I covered all mentions of it in the docs.
Apparently on some distributions `nm --with-symbol-versions` does not report symbol versions, despite the flag. `readelf` should be a more reliable alternative which is also part of binutils. See spack/spack#44534 (comment) for more information
…54758) This avoids the fallback `copyto_unaliased!` implementation that indexes into the `HermOrSym` matrix, and instead this forwards the copy to the parent. This provides a slight speed-up. Also, with this `copyto!` specialized, we don't need the `Matrix` methods anymore. The fallback `Matrix` constructors call `copyto!` internally, and would remain equally performant. ```julia julia> H = Hermitian(rand(ComplexF64,2000,2000)); julia> dest = similar(H, size(H)); julia> @Btime copyto!($dest, $H); 15.023 ms (0 allocations: 0 bytes) # nightly v"1.12.0-DEV.699" 12.844 ms (0 allocations: 0 bytes) # this PR ``` This PR also changes the behavior for `copyto!` involving matrices with mismatched sizes, in which case the `copyto!` will now be a linear copy (which will usually error for a `Hermitian` matrix).
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 4e43058c2 New commit: 78bca4227 Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @KristofferC Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@4e43058...78bca42 ``` $ git log --oneline 4e43058c2..78bca4227 78bca4227 use the correct TOML.Parser coupled to Base.TOMLCache (#3921) ``` Co-authored-by: Dilum Aluthge <[email protected]>
Interpolating a type into a string leads to runtime dispatches, and JET throws numerous warnings. Using a `LazyString` gets rid of these. ```julia julia> using JET julia> @report_opt -(typemin(Int)//1) [ Info: tracking Base ┌ Warning: skipping (::Base.var"#show_bound#661")(io::IO, b) @ Base show.jl:2777 to avoid parsing too much code └ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092 ┌ Warning: skipping (::Base.var"#show_bound#661")(io::IO, b) @ Base show.jl:2777 to avoid parsing too much code └ @ Revise ~/.julia/packages/Revise/bAgL0/src/packagedef.jl:1092 ═════ 32 possible errors found ═════ ┌ -(x::Rational{Int64}) @ Base ./rational.jl:334 │┌ __throw_rational_numerator_typemin(T::Type{Int64}) @ Base ./rational.jl:337 ││┌ string(::String, ::Type{Int64}, ::String) @ Base ./strings/io.jl:189 │││┌ print_to_string(::String, ::Type{Int64}, ::String) @ Base ./strings/io.jl:148 ││││┌ print(io::IOBuffer, x::DataType) @ Base ./strings/io.jl:35 │││││┌ show(io::IOBuffer, x::DataType) @ Base ./show.jl:970 ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:975 │││││││┌ show_typealias(io::IOBuffer, x::Type) @ Base ./show.jl:810 ││││││││┌ make_typealias(x::Type) @ Base ./show.jl:620 │││││││││┌ modulesof!(s::Set{Module}, x::Type) @ Base ./show.jl:595 ││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %20::Any)::Any │││││││││└──────────────────── │││││││││┌ modulesof!(s::Set{Module}, x::Type) @ Base ./show.jl:596 ││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %34::Any)::Any │││││││││└──────────────────── │││││││││┌ modulesof!(s::Set{Module}, x::TypeVar) @ Base ./show.jl:589 ││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %1::Any)::Set{Module} │││││││││└──────────────────── │││││││┌ show_typealias(io::IOBuffer, x::Type) @ Base ./show.jl:813 ││││││││┌ show_typealias(io::IOBuffer, name::GlobalRef, x::Type, env::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:760 │││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:724 ││││││││││┌ show(io::IOContext{IOBuffer}, tv::TypeVar) @ Base ./show.jl:2788 │││││││││││┌ (::Base.var"#show_bound#661")(io::IOContext{IOBuffer}, b::Any) @ Base ./show.jl:2780 ││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, b::Any)::Any │││││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:719 ││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %252::Any)::Any │││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:722 ││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %313::Any)::Any │││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOContext{IOBuffer}, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:727 ││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %191::Any)::Any │││││││││└──────────────────── ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:978 │││││││┌ show_datatype(io::IOBuffer, x::DataType) @ Base ./show.jl:1094 ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1097 │││││││││┌ maybe_kws_nt(x::DataType) @ Base ./show.jl:1085 ││││││││││ runtime dispatch detected: eltype(%76::DataType)::Any │││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1186 │││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:724 ││││││││││┌ show(io::IOBuffer, tv::TypeVar) @ Base ./show.jl:2788 │││││││││││┌ (::Base.var"#show_bound#661")(io::IOBuffer, b::Any) @ Base ./show.jl:2780 ││││││││││││ runtime dispatch detected: show(io::IOBuffer, b::Any)::Any │││││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:719 ││││││││││ runtime dispatch detected: show(io::IOBuffer, %250::Any)::Any │││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:722 ││││││││││ runtime dispatch detected: show(io::IOBuffer, %310::Any)::Any │││││││││└──────────────────── │││││││││┌ show_typeparams(io::IOBuffer, env::Core.SimpleVector, orig::Core.SimpleVector, wheres::Vector{TypeVar}) @ Base ./show.jl:727 ││││││││││ runtime dispatch detected: show(io::IOBuffer, %190::Any)::Any │││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1157 │││││││││ runtime dispatch detected: show(io::IOBuffer, %224::Any)::Any ││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1162 │││││││││ runtime dispatch detected: show(io::IOBuffer, %54::Any)::Any ││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1148 │││││││││ runtime dispatch detected: show(io::IOBuffer, %57::Any)::Any ││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1150 │││││││││ runtime dispatch detected: show(io::IOBuffer, %54::Any)::Any ││││││││└──────────────────── ││││││││┌ show_datatype(io::IOBuffer, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1172 │││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOBuffer, %329::Tuple, %328::DataType)::Any ││││││││└──────────────────── ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:981 │││││││┌ show_unionaliases(io::IOBuffer, x::Union) @ Base ./show.jl:901 ││││││││┌ make_typealiases(x::Union) @ Base ./show.jl:822 │││││││││┌ modulesof!(s::Set{Module}, x::Union) @ Base ./show.jl:595 ││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %3::Any)::Any │││││││││└──────────────────── │││││││││┌ modulesof!(s::Set{Module}, x::Union) @ Base ./show.jl:596 ││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %17::Any)::Any │││││││││└──────────────────── │││││││┌ show_unionaliases(io::IOBuffer, x::Union) @ Base ./show.jl:914 ││││││││ runtime dispatch detected: show(io::IOBuffer, %89::Any)::Any │││││││└──────────────────── │││││││┌ show_unionaliases(io::IOBuffer, x::Union) @ Base ./show.jl:920 ││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %206::Any, x::Union, %204::Core.SimpleVector, %205::Vector{TypeVar})::Any │││││││└──────────────────── │││││││┌ show_unionaliases(io::IOBuffer, x::Union) @ Base ./show.jl:928 ││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %269::Any, x::Union, %267::Core.SimpleVector, %268::Vector{TypeVar})::Any │││││││└──────────────────── ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:985 │││││││┌ show_delim_array(io::IOBuffer, itr::Vector{Any}, op::Char, delim::Char, cl::Char, delim_one::Bool) @ Base ./show.jl:1392 ││││││││┌ show_delim_array(io::IOBuffer, itr::Vector{Any}, op::Char, delim::Char, cl::Char, delim_one::Bool, i1::Int64, l::Int64) @ Base ./show.jl:1403 │││││││││ runtime dispatch detected: show(%3::IOContext{IOBuffer}, %52::Any)::Any ││││││││└──────────────────── ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:1012 │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1185 ││││││││┌ show_type_name(io::IOContext{IOBuffer}, tn::Core.TypeName) @ Base ./show.jl:1059 │││││││││ runtime dispatch detected: Base.isvisible(%29::Symbol, %86::Module, %80::Any)::Bool ││││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1157 ││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %227::Any)::Any │││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1162 ││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %55::Any)::Any │││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1148 ││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %58::Any)::Any │││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1150 ││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %55::Any)::Any │││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1172 ││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOContext{IOBuffer}, %338::Tuple, %337::DataType)::Any │││││││└──────────────────── │││││││┌ show_datatype(io::IOContext{IOBuffer}, x::DataType, wheres::Vector{TypeVar}) @ Base ./show.jl:1180 ││││││││ runtime dispatch detected: Base.show_at_namedtuple(io::IOContext{IOBuffer}, %387::Tuple, %391::DataType)::Any │││││││└──────────────────── ││││││┌ _show_type(io::IOBuffer, x::Type) @ Base ./show.jl:1014 │││││││ runtime dispatch detected: show(%98::IOContext{IOBuffer}, %99::Any)::Any ││││││└──────────────────── │││││┌ show(io::IOBuffer, x::DataType) @ Base ./show.jl:970 ││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, %1::Any)::Nothing │││││└──────────────────── julia> @noinline Base.__throw_rational_numerator_typemin(T) = throw(OverflowError(LazyString("rational numerator is typemin(", T, ")"))) julia> @report_opt -(typemin(Int)//1) No errors detected ```
…54606) fixes #53061 Co-authored-by: Orestis Ousoultzoglou <[email protected]>
This makes it so we avoid a ccall boundary and potentially optimize away repeated world age checks
Nothing is ever activating this, and it probably hasn't been tested in a while. As far as I can tell, this code path was added by @vtjnash in 082d7d2 I have no particular beef with this code other than "it complicates the thread / task logic, so dealing with this requires understanding one more moving part, removing it makes it simpler". If it is decided that this code should rather be kept, "just in case" (which, though), that's equally fine by me. Thought perhaps a comment could be added explaining the motivation for keeping it even thought it is currently always disabled?
The `outerref` form was added in c3eedce, but the renaming pass for them was removed two years later in c446444, without removing the form itself. As far as I can tell, today, `outerref` is essentially equivalent to `(globalref (thismodule) name)` (which was the original form, before outteref was introduced) because it just expands to a toplevel symbol. I don't think there remains any reason to keep this form after the renaming pass was removed and moreover it is confusing as one could reasonaly infer (as I did an incorrectly wrote in a comment) that `outerref` provides outer access, which it does not. This PR removes the form entirely and replaces them with an appropriate globalref.
Actually these do not really seem to matter much in practice (as explained to me by @vtjnash on Slack, thank you). The one thing that did cause me some grief here, though, was that stack_hi was the low address and stack_lo the high address. A smaller change to achieve that "hi means high, lo means low" would be to just reverse `stack_hi` and `stack_lo`.
This pass was assuming that the post-dominator of all finalizer uses exists as a real BB in the CFG. Resolves #54596
The same definition exists a few lines earlier. Split from #54654 where it would be an error to try to do this before the invalidation mechanism exists, but the change is generally applicable.
This hack will cease functioning soon (#54739), so it must be removed so that packages can stop relying on it. As an aid, now provide some basic conversion and printing support for the Base.TOML variants of this as well such that users can round-trip the contents (if they are well-formed as a date/time).
The `_copyto!` methods were not defined for all combinations, and `copyto!` was also too permissive (it accepted mismatched `uplo`s). This PR adds the missing methods, and updates the specialized `copyto!` such that it only accepts combinations with matching `uplo`s. The other cases will be handled by the fallback method. Fixes, e.g.: ```julia julia> using LinearAlgebra julia> A = [1 2; 3 4]; julia> copyto!(UpperTriangular(A), UnitUpperTriangular(A)) ERROR: MethodError: no method matching _copyto!(::UpperTriangular{Int64, Matrix{Int64}}, ::UnitUpperTriangular{Int64, Matrix{Int64}}) The function `_copyto!` exists, but no method is defined for this combination of argument types. [...] ``` After this, ```julia julia> copyto!(UpperTriangular(A), UnitUpperTriangular(A)) 2×2 UpperTriangular{Int64, Matrix{Int64}}: 1 2 ⋅ 1 ```
…#54781) When testing a new version of `libblastrampoline` that may have flags and values that we don't know about, raise a nice warning rather than a hard error.
This enables full RELRO (Read-Only Relocations) on Linux. It is helpful for hardening Linux binaries and prevents GOT overwrite attacks. There is some concern this would slow down startup or package load, but under the following workloads there is no detectable difference, and infact RELRO appears slightly faster. ``` time julia -e 'using Pkg; using LinearAlgebra; exit()' time julia -e 'exit()' ``` Master sys time average: 0.052 This commit sys time average: 0.044 We can validate that "full RELRO" is enabled with checksec: ``` [nix-shell:~/src/julia]$ checksec --file=./julia RELRO STACK CANARY NX PIE RPATH RUNPATH Symbols FORTIFY Fortified Fortifiable FILE Full RELRO No canary found NX enabled No PIE No RPATH RUNPATH 39 Symbols No 0 0 ./julia ```
It seems common for people to not infer the recommended action here, so make it clearer.
The `:enter` expression was replaced with `EnterNode` before, so we don't need to handle it anymore. Also it's better to add `:public` to `VALID_EXPR_HEADS` although we don't usually optimize a top-level thunk containing `:public` expressions.
This release fixes issues with complex valued returns from functions such as `cdotc` on Windows x64. See this discussion [0] for initial diagnosis, and this PR [1] for the relevant fixes. [0] JuliaLinearAlgebra/BLISBLAS.jl#15 [1] JuliaLinearAlgebra/libblastrampoline#129
Continuation of #54500. I realized the erroring line is one lower.
Use our shiny new URL [modernjuliaworkflows.org](https://modernjuliaworkflows.org/). [Thanks a lot](#55036 (comment)) @ViralBShah!
Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 6b4394914 New commit: e4a6723bf Julia version: 1.12.0-DEV Pkg version: 1.12.0 Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Pkg.jl@6b43949...e4a6723 ``` $ git log --oneline 6b4394914..e4a6723bf e4a6723bf Use `Base.TOML.Parser{Dates}` for TOML parsing w/ Dates support (#3938) 8c1f45d98 Append bundled depots to places where we empty it during tests (#3807) 2fdfabaf5 Test fixes (#3972) 34bb51ece fix bad depot path setting (#3971) 3715685b9 fix suggestions threshold for printing (#3968) 3f81d6c4d feat: add JULIA_PKG_GC_AUTO env var (#3642) fad26d7f2 check `project_file` isa String (#3967) 8875120ad fix not hardcoding "Project.toml" when fixing up extensions in manifest (#3851) 90d42a1b0 Make manifest usage log errors non-fatal (#3962) ``` Co-authored-by: Dilum Aluthge <[email protected]>
Precursor to #54855
Should fix #46724. Example output: ``` 8 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 16 : 1857/ 725307 objects ( 89% old), 709 pages, 29 kB, 11340 kB waste 24 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 32 : 55025/ 922866 objects ( 96% old), 1806 pages, 1719 kB, 28841 kB waste 40 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 48 : 31668/ 199826 objects ( 97% old), 586 pages, 1484 kB, 9338 kB waste 56 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 64 : 32767/ 118320 objects ( 94% old), 464 pages, 2047 kB, 7311 kB waste 72 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 80 : 13711/ 19584 objects ( 95% old), 96 pages, 1071 kB, 1486 kB waste 88 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 96 : 4893/ 8500 objects ( 95% old), 50 pages, 458 kB, 781 kB waste 104 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 112 : 3513/ 6132 objects ( 99% old), 42 pages, 384 kB, 670 kB waste 120 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 128 : 3890/ 4572 objects ( 90% old), 36 pages, 486 kB, 532 kB waste 136 : 0/ 0 objects ( 0% old), 0 pages, 0 kB, 0 kB waste 144 : 387/ 12656 objects ( 94% old), 112 pages, 54 kB, 1789 kB waste 160 : 553/ 1836 objects ( 96% old), 18 pages, 86 kB, 284 kB waste 176 : 463/ 1395 objects ( 99% old), 15 pages, 79 kB, 239 kB waste 192 : 170/ 765 objects ( 96% old), 9 pages, 31 kB, 142 kB waste 208 : 137/ 468 objects ( 82% old), 6 pages, 27 kB, 91 kB waste 224 : 6180/ 6497 objects ( 99% old), 89 pages, 1351 kB, 1423 kB waste 240 : 93/ 544 objects (100% old), 8 pages, 21 kB, 128 kB waste 256 : 310/ 693 objects ( 98% old), 11 pages, 77 kB, 175 kB waste 272 : 196/ 360 objects ( 91% old), 6 pages, 52 kB, 91 kB waste 288 : 817/ 1120 objects ( 92% old), 20 pages, 229 kB, 301 kB waste 304 : 67/ 265 objects (100% old), 5 pages, 19 kB, 80 kB waste 336 : 133/ 480 objects ( 99% old), 10 pages, 43 kB, 159 kB waste 368 : 238/ 572 objects ( 97% old), 13 pages, 85 kB, 205 kB waste 400 : 91/ 360 objects (100% old), 9 pages, 35 kB, 144 kB waste 448 : 127/ 432 objects ( 96% old), 12 pages, 55 kB, 189 kB waste 496 : 110/ 330 objects ( 99% old), 10 pages, 53 kB, 159 kB waste 544 : 150/ 330 objects ( 98% old), 11 pages, 79 kB, 174 kB waste 576 : 45/ 168 objects (100% old), 6 pages, 25 kB, 96 kB waste 624 : 61/ 182 objects (100% old), 7 pages, 37 kB, 112 kB waste 672 : 49/ 144 objects (100% old), 6 pages, 32 kB, 96 kB waste 736 : 63/ 198 objects ( 93% old), 9 pages, 45 kB, 141 kB waste 816 : 63/ 180 objects ( 98% old), 9 pages, 50 kB, 143 kB waste 896 : 61/ 126 objects (100% old), 7 pages, 53 kB, 112 kB waste 1008 : 59/ 128 objects ( 89% old), 8 pages, 58 kB, 122 kB waste 1088 : 67/ 120 objects ( 91% old), 8 pages, 71 kB, 121 kB waste 1168 : 22/ 70 objects (100% old), 5 pages, 25 kB, 80 kB waste 1248 : 23/ 78 objects (100% old), 6 pages, 28 kB, 96 kB waste 1360 : 36/ 72 objects ( 97% old), 6 pages, 47 kB, 94 kB waste 1488 : 27/ 66 objects (100% old), 6 pages, 39 kB, 96 kB waste 1632 : 22/ 50 objects (100% old), 5 pages, 35 kB, 80 kB waste 1808 : 18/ 54 objects (100% old), 6 pages, 31 kB, 96 kB waste 2032 : 26/ 72 objects (100% old), 9 pages, 51 kB, 144 kB waste 772 kB (82% old) in 167 large objects (82% old) ```
This uses LLVM's BOLT to optimize libLLVM, libjulia-internal and libjulia-codegen. This improves the allinference benchmarks by about 10% largely due to the optimization of libjulia-internal. The example in issue #45395 which stresses LLVM significantly more also sees a ~10% improvement. We see a 20% improvement on ```julia @time for i in 1:100000000 string(i) end ``` When building corecompiler.ji: BOLT gives about a 16% improvement PGO+LTO gives about a 21% improvement PGO+LTO+BOLT gives about a 23% improvement This only requires a single build of LLVM and theoretically none if we change the binary builder script (i.e. we build with relocations and the `-fno-reorder-blocks-and-partition` and then we can use BOLT to get binaries with no relocations and reordered blocks and then ship both binaries?) compared to the 2 in PGO. Also, this theoretically can improve performance of a PGO+LTO build by a couple %. The only reproducible test problem I see is that the BOLT, PGO+LTO and PGO+LTO+BOLT builds all cause `readelf` to emit warnings as part of the `osutils` tests. ``` readelf: Warning: Unrecognised form: 0x22 readelf: Warning: DIE has locviews without loclist readelf: Warning: Unrecognised form: 0x23 readelf: Warning: DIE at offset 0x227399 refers to abbreviation number 14754 which does not exist readelf: Warning: Bogus end-of-siblings marker detected at offset 212aa9 in .debug_info section readelf: Warning: Bogus end-of-siblings marker detected at offset 212ab0 in .debug_info section readelf: Warning: Further warnings about bogus end-of-sibling markers suppressed ``` The unrecognised form warnings seem to be a bug in binutils, https://sourceware.org/bugzilla/show_bug.cgi?id=28981. `DIE at offset` warning I believe was fixed in binutils 2.36, https://sourceware.org/bugzilla/show_bug.cgi?id=26808, but `ld -v` says I have 2.38. I assume these are all benign. I also don't see them on CI here https://buildkite.com/julialang/julia-buildkite/builds/1507#018f00e7-0737-4a42-bcd9-d4061dc8c93e so could just be a local issue.
Seems fairly odd to have a single lock protecting the symbol table, GC pages and the permanent allocator -- three parts of the codebase which have little interconnection. Let's create a lock for each.
Changes made: - Use 0 for the thread ID to ensure it's always valid. The function expects `0 <= tid < jl_n_threads` so 1 is incorrect if `jl_n_threads` is 1. - After retrieving the affinity mask with `jl_getaffinity`, pass that same mask back to `jl_setaffinity`. This ensures that the mask is always valid. Using a mask of all ones results in `EINVAL` on FreeBSD. Based on the discussion in #53402, this change may also fix Windows, so I've tried reenabling it here. - To check whether `jl_getaffinity` actually did something, we can check that the mask is no longer all zeros after the call. Fixes #54817
) The `(::Diagonal) + (::Symmetric)` and analogous methods were specialized in #35333 to return a `Symmetric`, but these only work if the `Diagonal` is also symmetric. This typically holds for arrays of numbers, but may not hold for block-diagonal and other types for which symmetry isn't guaranteed. This PR restricts the methods to arrays of `Number`s. Fixes, e.g.: ```julia julia> using StaticArrays, LinearAlgebra julia> D = Diagonal(fill(SMatrix{2,2}(1:4), 2)) 2×2 Diagonal{SMatrix{2, 2, Int64, 4}, Vector{SMatrix{2, 2, Int64, 4}}}: [1 3; 2 4] ⋅ ⋅ [1 3; 2 4] julia> S = Symmetric(D) 2×2 Symmetric{AbstractMatrix, Diagonal{SMatrix{2, 2, Int64, 4}, Vector{SMatrix{2, 2, Int64, 4}}}}: [1 3; 3 4] ⋅ ⋅ [1 3; 3 4] julia> S + D 2×2 Symmetric{AbstractMatrix, Diagonal{SMatrix{2, 2, Int64, 4}, Vector{SMatrix{2, 2, Int64, 4}}}}: [2 6; 6 8] ⋅ ⋅ [2 6; 6 8] julia> S[1,1] + D[1,1] 2×2 SMatrix{2, 2, Int64, 4} with indices SOneTo(2)×SOneTo(2): 2 6 5 8 julia> (S + D)[1,1] == S[1,1] + D[1,1] false ``` After this, ```julia julia> S + D 2×2 Matrix{AbstractMatrix{Int64}}: [2 6; 5 8] [0 0; 0 0] [0 0; 0 0] [2 6; 5 8] ``` Even with `Number`s as elements, there might be an issue with `NaN`s along the diagonal as `!issymmetric(NaN)`, but that may be a different PR.
…55281) There some advantages in running this on GitHub Actions (GHA) rather than Buildkite (BK): * on GHA this task takes ~10 seconds, on BK it takes ~1 minute (job setup on BK takes way too long) * since for this task we can use GitHub-hosted runners (which come with Julia preinstalled), we can spare BK runners from running this job. Admittedly it's very marginal saving, but better than nothing when the queue gets long * using GHA allows us to easily add source code annotations in PR overviews, which make it easier to quickly spot the line to fix from the GitHub web interface. This would be doable also on BK, but slightly more annoying. As [an example](giordano@a7725e4):  If this PR is accepted, I'll remove the corresponding job from BK. --------- Co-authored-by: Dilum Aluthge <[email protected]>
… external GitHub Actions to full-length commit hashes (#55283)
This is a very slight tweak to the implementation of `isinteger(::AbstractFloat)` to use `iszero` rather than `== 0`. It shouldn't make any difference with any of the built-in floating-point types, but `iszero` might conceivably be faster for some user-defined types. I also added a comment to indicate why it's using `iszero(x - trunc(x))` rather than `x == trunc(x)` (due to non-finite values); this code dates back to #14569 in Julia 0.5. --------- Co-authored-by: Sukera <[email protected]>
`const_prop_entry_heuristics` currently checks the return type only, so I have given it a name that reflects this and adjusted the remarks accordingly. There are no changes to the basic behavior of inference.
All changes are cosmetic and do not change the basic functionality: - Added the interface type to the callbacks received by `simple_walker` to clarify which objects are passed as callbacks to `simple_walker`. - Replaced ambiguous names like `idx` with more descriptive ones like `defidx` to make the algorithm easier to understand.
…l` wrapper correctly. (#54736)
Ref: #54107 (comment). If accepted, I'll add the NEWS.md entry for PGO/LTO in the release-1.11 branch too.
Also removes nss flag as NSS seems to have been removed from curl and I think the flag was dropped in https://github.com/curl/curl/pull/11459/files. Fixes #55286.
This PR make `has_fast_linear_indexing` rely on `IndexStyle`/`ndims` to fix `mapreduce` for `Broadcasted` with `dim > 1`. Before: ```julia julia> a = randn(100,100); julia> bc = Broadcast.instantiate(Base.broadcasted(+,a,a)); julia> sum(bc,dims = 1,init = 0.0) == sum(collect(bc), dims = 1) ERROR: MethodError: no method matching LinearIndices(::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}, typeof(+), Tuple{Matrix{Float64}, Matrix{Float64}}}) ``` After: ```julia julia> sum(bc,dims = 1,init = 0.0) == sum(collect(bc), dims = 1) true ``` This should extend the optimized fallback to more `AbstractArray`. (e.g. `SubArray`) Test added.
It can be very helpful, when struggling with LBT forwarding, to see what functions were actually forwarded to a new library. This utility function makes it easy to query which functions are forwarded to that library.
…wner (#55294) In updating DAECompiler to the new engine API, I was running some trouble, because the source it produces is not a `CodeInfo` or a `String` (which is fine because it has a non-nothing `owner`). Adjust the test to consider any non-nothing value in .inferred valid source (at least for non-nothing CI owners).
- propagate the lattice that was not propagated - remove unused `condargs` allocation
Currently, these are inferred as a 2-Tuple of possible return types depending on `jobz`, but since `jobz` is usually a constant, we may propagate it aggressively and have the return types inferred concretely.
The following symbols: `seed!, default_rng, Sampler, SamplerType, SamplerTrivial, SamplerSimple` Are documented in the Julia documentation and unexported, but not marked as public. Co-authored-by: Max Horn <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )