Skip to content

Commit

Permalink
Merge branch 'backports-release-1.8' into vc/fp16_bb
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jul 20, 2022
2 parents e54b624 + f3bc6bf commit 1edfa27
Show file tree
Hide file tree
Showing 23 changed files with 168 additions and 108 deletions.
10 changes: 7 additions & 3 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ julia> y
"""
function copyto!(dest::AbstractArray, src::AbstractArray)
isempty(src) && return dest
if dest isa BitArray
# avoid ambiguities with other copyto!(::AbstractArray, ::SourceArray) methods
return _copyto_bitarray!(dest, src)
end
src′ = unalias(dest, src)
copyto_unaliased!(IndexStyle(dest), dest, IndexStyle(src′), src′)
end
Expand Down Expand Up @@ -1115,10 +1119,10 @@ function copyto!(B::AbstractVecOrMat{R}, ir_dest::AbstractRange{Int}, jr_dest::A
return B
end

function copyto_axcheck!(dest, src)
@noinline checkaxs(axd, axs) = axd == axs || throw(DimensionMismatch("axes must agree, got $axd and $axs"))
@noinline _checkaxs(axd, axs) = axd == axs || throw(DimensionMismatch("axes must agree, got $axd and $axs"))

checkaxs(axes(dest), axes(src))
function copyto_axcheck!(dest, src)
_checkaxs(axes(dest), axes(src))
copyto!(dest, src)
end

Expand Down
53 changes: 28 additions & 25 deletions base/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -501,40 +501,42 @@ function Array{T,N}(B::BitArray{N}) where {T,N}
end

BitArray(A::AbstractArray{<:Any,N}) where {N} = BitArray{N}(A)

function BitArray{N}(A::AbstractArray{T,N}) where N where T
B = BitArray(undef, convert(Dims{N}, size(A)::Dims{N}))
Bc = B.chunks
l = length(B)
_checkaxs(axes(B), axes(A))
_copyto_bitarray!(B, A)
return B::BitArray{N}
end

function _copyto_bitarray!(B::BitArray, A::AbstractArray)
l = length(A)
l == 0 && return B
ind = 1
l > length(B) && throw(BoundsError(B, length(B)+1))
Bc = B.chunks
nc = num_bit_chunks(l)
Ai = first(eachindex(A))
@inbounds begin
for i = 1:length(Bc)-1
for i = 1:nc-1
c = UInt64(0)
for j = 0:63
c |= (UInt64(convert(Bool, A[ind])::Bool) << j)
ind += 1
c |= (UInt64(convert(Bool, A[Ai])::Bool) << j)
Ai = nextind(A, Ai)
end
Bc[i] = c
end
c = UInt64(0)
for j = 0:_mod64(l-1)
c |= (UInt64(convert(Bool, A[ind])::Bool) << j)
ind += 1
tail = _mod64(l - 1) + 1
for j = 0:tail-1
c |= (UInt64(convert(Bool, A[Ai])::Bool) << j)
Ai = nextind(A, Ai)
end
Bc[end] = c
msk = _msk_end(tail)
Bc[nc] = (c & msk) | (Bc[nc] & ~msk)
end
return B
end

function BitArray{N}(A::Array{Bool,N}) where N
B = BitArray(undef, size(A))
Bc = B.chunks
l = length(B)
l == 0 && return B
copy_to_bitarray_chunks!(Bc, 1, A, 1, l)
return B::BitArray{N}
end

reinterpret(::Type{Bool}, B::BitArray, dims::NTuple{N,Int}) where {N} = reinterpret(B, dims)
reinterpret(B::BitArray, dims::NTuple{N,Int}) where {N} = reshape(B, dims)

Expand Down Expand Up @@ -721,24 +723,25 @@ function _unsafe_setindex!(B::BitArray, X::AbstractArray, I::BitArray)
lx = length(X)
last_chunk_len = _mod64(length(B)-1)+1

c = 1
Xi = first(eachindex(X))
lastXi = last(eachindex(X))
for i = 1:lc
@inbounds Imsk = Ic[i]
@inbounds C = Bc[i]
u = UInt64(1)
for j = 1:(i < lc ? 64 : last_chunk_len)
if Imsk & u != 0
lx < c && throw_setindex_mismatch(X, c)
@inbounds x = convert(Bool, X[c])
Xi > lastXi && throw_setindex_mismatch(X, count(I))
@inbounds x = convert(Bool, X[Xi])
C = ifelse(x, C | u, C & ~u)
c += 1
Xi = nextind(X, Xi)
end
u <<= 1
end
@inbounds Bc[i] = C
end
if length(X) != c-1
throw_setindex_mismatch(X, c-1)
if Xi != nextind(X, lastXi)
throw_setindex_mismatch(X, count(I))
end
return B
end
Expand Down
4 changes: 2 additions & 2 deletions base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ end

# non-type specific math functions

@inline function two_mul(x::Float64, y::Float64)
@assume_effects :consistent @inline function two_mul(x::Float64, y::Float64)
if Core.Intrinsics.have_fma(Float64)
xy = x*y
return xy, fma(x, y, -xy)
end
return Base.twomul(x,y)
end

@inline function two_mul(x::T, y::T) where T<: Union{Float16, Float32}
@assume_effects :consistent @inline function two_mul(x::T, y::T) where T<: Union{Float16, Float32}
if Core.Intrinsics.have_fma(T)
xy = x*y
return xy, fma(x, y, -xy)
Expand Down
2 changes: 1 addition & 1 deletion base/reinterpretarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ stride(A::Union{DenseArray,StridedReshapedArray,StridedReinterpretArray}, k::Int
k ndims(A) ? strides(A)[k] : length(A)

function strides(a::ReinterpretArray{T,<:Any,S,<:AbstractArray{S},IsReshaped}) where {T,S,IsReshaped}
_checkcontiguous(Bool, a) && return size_to_strides(1, size(a))
_checkcontiguous(Bool, a) && return size_to_strides(1, size(a)...)
stp = strides(parent(a))
els, elp = sizeof(T), sizeof(S)
els == elp && return stp # 0dim parent is also handled here.
Expand Down
4 changes: 2 additions & 2 deletions base/tuple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ function setindex(x::Tuple, v, i::Integer)
_setindex(v, i, x...)
end

function _setindex(v, i::Integer, args...)
function _setindex(v, i::Integer, args::Vararg{Any,N}) where {N}
@inline
return ntuple(j -> ifelse(j == i, v, args[j]), length(args))
return ntuple(j -> ifelse(j == i, v, args[j]), Val{N}())
end


Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ MPFR_VER := 4.1.0
MPFR_JLL_NAME := MPFR

# nghttp2
NGHTTP2_VER := 1.47.0
NGHTTP2_VER := 1.48.0
NGHTTP2_JLL_NAME := nghttp2

# Objconv (we don't ship this, so no need for a fake JLL; therefore we specify the JLL_VER here)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
505a28c1e9246f92d0440b7ed9599e27
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
67d76980cc5430274bc7c1d5c1de4cc163a1583bbd373e074fc15296481e8bc202f7a4b77af6fd32677a974e9ad5d65dcfd72d74bf0ff657d4cee067eba595f0

This file was deleted.

This file was deleted.

68 changes: 34 additions & 34 deletions deps/checksums/nghttp2
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
nghttp2-1.47.0.tar.bz2/md5/2bca98caef4b5c27d5bdc4732f36a5d6
nghttp2-1.47.0.tar.bz2/sha512/4dbd0fe10f5c68d363ee0fff2aceb97f58a755a276796f16b078cd3bec3a17cd5e0dadf1e5027347d3342daa3572332b14df230a4d9675a9b57fff67f8f9e5a3
nghttp2.v1.47.0+0.aarch64-apple-darwin.tar.gz/md5/76abe33c6e81346a133c3e26593db1b2
nghttp2.v1.47.0+0.aarch64-apple-darwin.tar.gz/sha512/72a1302134ab4715f4c0b8f702a566498d4595aa7a3fd762e43d7e0ca5987506a9b1dc53318763595ad652d8c4a633c3c5e0500a8f4e3007cb6cf9e30341d9ff
nghttp2.v1.47.0+0.aarch64-linux-gnu.tar.gz/md5/1e5ad3ad31290e017c930c2d1dbda38d
nghttp2.v1.47.0+0.aarch64-linux-gnu.tar.gz/sha512/c8a2543f079751bcaf7165661f5f4053fd1b733cde0f82078736c898503c796fdd7ce587f0da2d1bb3d35a74a644fed6e8cc30a3520e577593d19700e822cc55
nghttp2.v1.47.0+0.aarch64-linux-musl.tar.gz/md5/7079c203ec5e6fcf45d01bfa1ca0b1b8
nghttp2.v1.47.0+0.aarch64-linux-musl.tar.gz/sha512/152f34f1e9a5f741d69d62587762a96fd290ecb41ec8eeff46fae39b5e606ff054755b88abe3bcaa07db640526fc12546769da4a3761a18240eb3d2699de8886
nghttp2.v1.47.0+0.armv6l-linux-gnueabihf.tar.gz/md5/918f3e549998e34f2aa292a2ff7945be
nghttp2.v1.47.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/545c5674a6492dbd5f109303383b920b0b011e37e8a4abfb329b22cab50a6a977d9f74aac6f4aaa833064fbaae4b5ebc019e83d2edb8b4af2515f36f4530937f
nghttp2.v1.47.0+0.armv6l-linux-musleabihf.tar.gz/md5/1345980d4822c6e9c1934378e365e343
nghttp2.v1.47.0+0.armv6l-linux-musleabihf.tar.gz/sha512/470c66205d257ba3b23b0db8ea93fe40bc71c219d50cd88a6b57abf8c105218bd9912b9a605da12903793893f37803b0e3357566e20035a079ed2b4bcc6d7b78
nghttp2.v1.47.0+0.armv7l-linux-gnueabihf.tar.gz/md5/e831c03eeb810a48fbd34df2017c20be
nghttp2.v1.47.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/e90270b1f6ae7c90ce746f60c2f451f2271ec6f682003f3a0ee8eb97e9054932495fff22b2ca1f40e3711f847c520fa605c49c7ae671db7f282f78f8d745a0db
nghttp2.v1.47.0+0.armv7l-linux-musleabihf.tar.gz/md5/38d95842aa0d9e9ac9e77e468d18893d
nghttp2.v1.47.0+0.armv7l-linux-musleabihf.tar.gz/sha512/5e595d143248fadd5cfffa1f15b09698f1793c04422b12d5f8e22c52e4ebc5d947845fe3ef7539845ad731d4457c8a7a6e6e2bc1dbb5b32fd3cd374963aa9833
nghttp2.v1.47.0+0.i686-linux-gnu.tar.gz/md5/a3c54ab31e835ecbc12425b00a201bbf
nghttp2.v1.47.0+0.i686-linux-gnu.tar.gz/sha512/375354d57b14b73d7e4cf751b69872b19e6806b7a110c104c0dc25794a33dd89642f9911216c2c1a2698d45878c12b7d735402e44b9b4ba60a5a9751a522c19b
nghttp2.v1.47.0+0.i686-linux-musl.tar.gz/md5/2cdfc4b177bc88685e629362ac754cab
nghttp2.v1.47.0+0.i686-linux-musl.tar.gz/sha512/cb741c7d6dbfe5815e1691c98fac46c2559b419cb3bc882b925779d9699e7b37332ab197bdb3b7cb944de45ea0cc3c6f6e5f8df04b7556dac25f796e992d7dc5
nghttp2.v1.47.0+0.i686-w64-mingw32.tar.gz/md5/ec5f305e52c205a246db0e4ded79f6c8
nghttp2.v1.47.0+0.i686-w64-mingw32.tar.gz/sha512/4bd5f81bd1502bbc04973f0721099a230248b2be907f66f044fd1111326bf05804aae4df123eda65e7e90445157bc07e87d9e837dfd2393038e4e042254c16df
nghttp2.v1.47.0+0.powerpc64le-linux-gnu.tar.gz/md5/01431aaf0c383e2ab1460f41e3c64446
nghttp2.v1.47.0+0.powerpc64le-linux-gnu.tar.gz/sha512/ef3ed6eb1c77a81f46f7c06e4748d766144231ab3cc4875fb3502c6a553ce04937ee6dcb1516532c91043921b76779c1ea1ca20070907d3639d2f0fb036d0d56
nghttp2.v1.47.0+0.x86_64-apple-darwin.tar.gz/md5/12650859c3ba16131a35b63510816267
nghttp2.v1.47.0+0.x86_64-apple-darwin.tar.gz/sha512/a91d6b572ed830bdcd5822d8d0dbca70ce45f0c2706a1fb83aeccacad1a72391ea09683169ae9d8ed6e84a1f28d55d2ee26e49a68cca405dd032e9c128e54858
nghttp2.v1.47.0+0.x86_64-linux-gnu.tar.gz/md5/62fb16238af3cf50721b0a671d28dc8c
nghttp2.v1.47.0+0.x86_64-linux-gnu.tar.gz/sha512/f662f30ad7057bc9c724fd48e15a2894aa0a345a24d35acaa0f3cb25d73b329772942d3499647ba7563c110d2186e96d4a3b12e8721d28d2cd6491d93df24e05
nghttp2.v1.47.0+0.x86_64-linux-musl.tar.gz/md5/3224892e3e5c7d7ae24c2380fd731ab8
nghttp2.v1.47.0+0.x86_64-linux-musl.tar.gz/sha512/35d18c52dee94846a85d5a7a19bff95ce2b05e5290096d532c7f3d144ee809a2ba9072dd24372905c485ee0dfa03309be8cebead2b62292518ab5d63d80c9e4a
nghttp2.v1.47.0+0.x86_64-unknown-freebsd.tar.gz/md5/4b3c9032b11ba078d7a91a30d3cabc6a
nghttp2.v1.47.0+0.x86_64-unknown-freebsd.tar.gz/sha512/21c9d1c95e26bf33a0cedc63ac6e81dcc670d6bc3fefc9a8efbf7faff718875cf6fc51dfdb192afb00acf86257104de7a0dfcaaf29119ba055b69885c31a4dd4
nghttp2.v1.47.0+0.x86_64-w64-mingw32.tar.gz/md5/7d41384443541bf30b6165381b1c5305
nghttp2.v1.47.0+0.x86_64-w64-mingw32.tar.gz/sha512/2febfcc452bd4f2a3200e6edb8127f678749a358a4beb219b7b29294ade66bb817e1fbdce665f0e3e20d923ab3bc68598f3c769bd4f09871866e452b6aab52d0
nghttp2-1.48.0.tar.bz2/md5/887336a68dbf6e2fa78dd4fc2a515e01
nghttp2-1.48.0.tar.bz2/sha512/319b8c4f5f276e699fb04cf2a9aadd07bb0a26b78d8b37eb84e6dab603718b3d2c9bf6dca54816d4644cd6833177d842d7f7d3a1438a1c723d2b73e4ec2fb344
nghttp2.v1.48.0+0.aarch64-apple-darwin.tar.gz/md5/362b35eecbb86a49b956fa57168ec61c
nghttp2.v1.48.0+0.aarch64-apple-darwin.tar.gz/sha512/d8c35686ac6baf4ba6038355f1d3a275f2c3a9696d1b751a54c6e671cbd96c38b4600c6ac00d77e43efc4fbb01c7672d917142530efb0360c38a4159703b9156
nghttp2.v1.48.0+0.aarch64-linux-gnu.tar.gz/md5/2eb064be49b1990250a7c8ebffcc4a1e
nghttp2.v1.48.0+0.aarch64-linux-gnu.tar.gz/sha512/0fcef4bfa0cea2d7727241961551b0ff73337aefbe8f29a6ca06f856b142681e251af57795ba26edc25784a1845040a0a3865dd0ba26ea65c43478a02ea02080
nghttp2.v1.48.0+0.aarch64-linux-musl.tar.gz/md5/80f505a5b1f092e9a2e4609ff4b16b9f
nghttp2.v1.48.0+0.aarch64-linux-musl.tar.gz/sha512/3e260d9bb34058c7c841034d874dec2141e71f40c0e75fb751740dc46fe1cd5668c713e7efc154f1e7c964ed41b8fed9a08b780370e4a4fb44eb564eff1a2c72
nghttp2.v1.48.0+0.armv6l-linux-gnueabihf.tar.gz/md5/6b167502a95dac6f55cf2d312af09b91
nghttp2.v1.48.0+0.armv6l-linux-gnueabihf.tar.gz/sha512/da620c8e50ce4ca2fd150c7b83b0d1d40d3d9e184cb5dfff6883723b574e8c68ffd121a74154a0544e5beb7991740634c19916bb66b1349f46d772ddff3ceddf
nghttp2.v1.48.0+0.armv6l-linux-musleabihf.tar.gz/md5/b9079b10a7f0e190232426cbed35f8e9
nghttp2.v1.48.0+0.armv6l-linux-musleabihf.tar.gz/sha512/dd0afaa8eed6df8c0b4f78c3408e6a0b881957d183b5dfa4e6d9aa131d92a7485198da316dfbb28280b6e5e281432ee1dc1bbff5906a29cc29afa77390d83e09
nghttp2.v1.48.0+0.armv7l-linux-gnueabihf.tar.gz/md5/cfacf5fcb143757b6fa64081011807d6
nghttp2.v1.48.0+0.armv7l-linux-gnueabihf.tar.gz/sha512/5b9acc860474722c07f73b3d049c5d131c86212264a49270253861b897b165e4a8cd608ac3735ee72c90cdd36ea9342208e1eee48e9e2407b3b10ca2cf23f2d1
nghttp2.v1.48.0+0.armv7l-linux-musleabihf.tar.gz/md5/76dfdc217fb52e74955b6dd95bace880
nghttp2.v1.48.0+0.armv7l-linux-musleabihf.tar.gz/sha512/05b7b6ae7cee062409eb941147e45e0b1b68a0ddcd8a022bd008a2f04a1249051a6e69dba511398b3e98e1144004bf0e6580fb4417f5500746f5b4b3eb65179f
nghttp2.v1.48.0+0.i686-linux-gnu.tar.gz/md5/8ec510d34f87830be0cea46378474a0c
nghttp2.v1.48.0+0.i686-linux-gnu.tar.gz/sha512/c3262180298ebfe1aee5fa3b25a491f4fc6122d0936c0fcfdd1d3f7f884dbcdbc9cbca05df986782e200334c4d97bd5ed5b75a9286910d04b00eac9efa43d67a
nghttp2.v1.48.0+0.i686-linux-musl.tar.gz/md5/90fa7935261e782dbd14aa858ae2d511
nghttp2.v1.48.0+0.i686-linux-musl.tar.gz/sha512/790bcac85995a2e5caddaf19023c90a5b9566d166da48b98581de2e12d84c7beaa74e7ef9ae55bcf4a68c91e1e873204328c8672634e5ed3fc79721a9939b480
nghttp2.v1.48.0+0.i686-w64-mingw32.tar.gz/md5/b7654776af03333caf4ba1517ffd2636
nghttp2.v1.48.0+0.i686-w64-mingw32.tar.gz/sha512/b8f82c7a8f3ca6cb3cd8ab760d8299b0dcc6a03c7e51be965168c01de07b900891e48e13fbcee67856afddb10c41b402a4b384a06d3fbee41c4d5f3b6e352c53
nghttp2.v1.48.0+0.powerpc64le-linux-gnu.tar.gz/md5/eaee75e48bb77137c09abc5abccc6db1
nghttp2.v1.48.0+0.powerpc64le-linux-gnu.tar.gz/sha512/4b99d91a7f751c05835c73bb6b0f49c851ca36ead41c5137aedf5e96bd48d894768b9fdb65f83560ea86e0c3f854e52bf66f8859dcd920446db1a121c7a5e0f2
nghttp2.v1.48.0+0.x86_64-apple-darwin.tar.gz/md5/1720e70d0e72afbf36900ed75cba45d0
nghttp2.v1.48.0+0.x86_64-apple-darwin.tar.gz/sha512/4c07a7d78bb1366a913321d8258d0cbd0d0b7d85f43b5980617fd1451dc39e7859134e86ec59b06b3b6dc8b62b71f9890eecf2737f8cf4e441bf08c2e61cefc6
nghttp2.v1.48.0+0.x86_64-linux-gnu.tar.gz/md5/a94aab74d021578fcda21836c8030c9b
nghttp2.v1.48.0+0.x86_64-linux-gnu.tar.gz/sha512/c1c31e32e60087fe7facbfea4bd4897649c8eeef92101093df4897f41847461851497e436c4a4e1c847c9bf5ac678934aba1eca0d8a6e17302d9474ca3064fb5
nghttp2.v1.48.0+0.x86_64-linux-musl.tar.gz/md5/677ad574f615b2d77fecdac0c75111db
nghttp2.v1.48.0+0.x86_64-linux-musl.tar.gz/sha512/737637a68364096ea6c507e37c9305df875c8830d58a05404ceb2e76d69bd6e44c82483e0f8228cdc7a64b0419de75d2d99151fac369bacd42fc06a71b35ec54
nghttp2.v1.48.0+0.x86_64-unknown-freebsd.tar.gz/md5/b65cf09003912eb4201db80253fc5b04
nghttp2.v1.48.0+0.x86_64-unknown-freebsd.tar.gz/sha512/fdf7c733f4247f66733dd36e314cf6772abfecb82ec99c613db66910eb956849851587d74b9e940e1f0d743142555ccf96bf7b990b3502e17028cbdd8bc504d8
nghttp2.v1.48.0+0.x86_64-w64-mingw32.tar.gz/md5/cfb494369553277c10a7b1eaf1c116fd
nghttp2.v1.48.0+0.x86_64-w64-mingw32.tar.gz/sha512/066b8a9cbf3fe710704b56af2917279f32cd3cef69808bb56872d367061402832dc1cbb01988b35652751e66c937d29a0190b98bfcd846a50fd80392b5a7e1bd
17 changes: 13 additions & 4 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,19 @@ jl_code_info_t *jl_type_infer(jl_method_instance_t *mi, size_t world, int force)
src = (jl_code_info_t*)jl_apply(fargs, 3);
}
JL_CATCH {
jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: encountered unexpected error in runtime:\n");
jl_static_show((JL_STREAM*)STDERR_FILENO, jl_current_exception());
jl_printf((JL_STREAM*)STDERR_FILENO, "\n");
jlbacktrace(); // written to STDERR_FILENO
jl_value_t *e = jl_current_exception();
if (e == jl_stackovf_exception) {
jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: stack overflow in type inference of ");
jl_static_show_func_sig((JL_STREAM*)STDERR_FILENO, (jl_value_t*)mi->specTypes);
jl_printf((JL_STREAM*)STDERR_FILENO, ".\n");
jl_printf((JL_STREAM*)STDERR_FILENO, "This might be caused by recursion over very long tuples or argument lists.\n");
}
else {
jl_printf((JL_STREAM*)STDERR_FILENO, "Internal error: encountered unexpected error in runtime:\n");
jl_static_show((JL_STREAM*)STDERR_FILENO, e);
jl_printf((JL_STREAM*)STDERR_FILENO, "\n");
jlbacktrace(); // written to STDERR_FILENO
}
src = NULL;
}
ct->world_age = last_age;
Expand Down
2 changes: 1 addition & 1 deletion src/jl_exported_funcs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
XX(jl_is_char_signed) \
XX(jl_is_const) \
XX(jl_is_debugbuild) \
XX(jl_is_foreign_type) \
XX(jl_is_identifier) \
XX(jl_is_imported) \
XX(jl_is_initialized) \
Expand Down Expand Up @@ -567,4 +568,3 @@
YY(LLVMExtraAddGCInvariantVerifierPass) \
YY(LLVMExtraAddDemoteFloat16Pass) \
YY(LLVMExtraAddCPUFeaturesPass) \

48 changes: 20 additions & 28 deletions stdlib/InteractiveUtils/src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,39 +356,31 @@ See also: [`code_native`](@ref), [`@code_llvm`](@ref), [`@code_typed`](@ref) and
A macro to execute an expression and produce a report of any time spent importing packages and their
dependencies. Any compilation time will be reported as a percentage, and how much of which was recompilation, if any.
If a package's dependencies have already been imported either globally or by another dependency they will
not appear under that package and the package will accurately report a faster load time than if it were to
be loaded in isolation.
!!! compat "Julia 1.9"
Reporting of any compilation and recompilation time was added in Julia 1.9
!!! note
During the load process a package sequentially imports all of its dependencies, not just its direct dependencies.
```julia-repl
julia> @time_imports using CSV
0.4 ms ┌ IteratorInterfaceExtensions
11.1 ms ┌ TableTraits 84.88% compilation time
145.4 ms ┌ SentinelArrays 66.73% compilation time
42.3 ms ┌ Parsers 19.66% compilation time
4.1 ms ┌ Compat
8.2 ms ┌ OrderedCollections
1.4 ms ┌ Zlib_jll
2.3 ms ┌ TranscodingStreams
6.1 ms ┌ CodecZlib
0.3 ms ┌ DataValueInterfaces
15.2 ms ┌ FilePathsBase 30.06% compilation time
9.3 ms ┌ InlineStrings
1.5 ms ┌ DataAPI
31.4 ms ┌ WeakRefStrings
14.8 ms ┌ Tables
24.2 ms ┌ PooledArrays
2002.4 ms CSV 83.49% compilation time
50.7 ms Parsers 17.52% compilation time
0.2 ms DataValueInterfaces
1.6 ms DataAPI
0.1 ms IteratorInterfaceExtensions
0.1 ms TableTraits
17.5 ms Tables
26.8 ms PooledArrays
193.7 ms SentinelArrays 75.12% compilation time
8.6 ms InlineStrings
20.3 ms WeakRefStrings
2.0 ms TranscodingStreams
1.4 ms Zlib_jll
1.8 ms CodecZlib
0.8 ms Compat
13.1 ms FilePathsBase 28.39% compilation time
1681.2 ms CSV 92.40% compilation time
```
!!! note
During the load process a package sequentially imports where necessary all of its dependencies, not just
its direct dependencies. That is also true for the dependencies themselves so nested importing will likely
occur, but not always. Therefore the nesting shown in this output report is not equivalent to the dependency
tree, but does indicate where import time has accumulated.
!!! compat "Julia 1.8"
This macro requires at least Julia 1.8
"""
:@time_imports
6 changes: 5 additions & 1 deletion stdlib/LinearAlgebra/src/LinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,11 @@ function __init__()
Base.at_disable_library_threading(() -> BLAS.set_num_threads(1))

if !haskey(ENV, "OPENBLAS_NUM_THREADS")
BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2))
@static if Sys.isapple() && Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "aarch64"
BLAS.set_num_threads(max(1, Sys.CPU_THREADS))
else
BLAS.set_num_threads(max(1, Sys.CPU_THREADS ÷ 2))
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion stdlib/Pkg.version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PKG_BRANCH = master
PKG_SHA1 = f0bef8af0ab951d9cf3cceb3c709873737df9471
PKG_SHA1 = 57ca49fcbb45b578b78ac77a702913b5e2de7c7c
PKG_GIT_URL := https://github.com/JuliaLang/Pkg.jl.git
PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1
2 changes: 1 addition & 1 deletion stdlib/nghttp2_jll/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "nghttp2_jll"
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.47.0+0"
version = "1.48.0+0"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
2 changes: 1 addition & 1 deletion stdlib/nghttp2_jll/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ end

@testset "nghttp2_jll" begin
info = unsafe_load(ccall((:nghttp2_version,libnghttp2), Ptr{nghttp2_info}, (Cint,), 0))
@test VersionNumber(unsafe_string(info.version_str)) == v"1.47.0"
@test VersionNumber(unsafe_string(info.version_str)) == v"1.48.0"
end
Loading

0 comments on commit 1edfa27

Please sign in to comment.