-
-
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
slow fallback array copyto!
in Julia 1.7.0
#43287
Labels
Comments
KristofferC
added
the
regression
Regression in behavior compared to a previous version
label
Dec 1, 2021
9 ── %70 = %new(Base.SCartesianIndex2{2}, 1, %65)::Base.SCartesianIndex2{2}
│ %71 = Core.tuple(1, %65, %66)::Tuple{Int64, Int64, Int64}
│ %72 = Core.tuple(%70, %71)::Tuple{Base.SCartesianIndex2{2}, Tuple{Int64, Int64, Int64}}
└─── goto #10
10 ┄ %74 = φ (#9 => %70)::Union{Base.SCartesianIndex2{2}, Tuple{Int64, Int64, Int64}}
│ %75 = φ (#9 => %71)::Union{Base.SCartesianIndex2{2}, Tuple{Int64, Int64, Int64}}
│ %76 = φ (#8 => %68, #9 => %72)::Union{Nothing, Tuple{Base.SCartesianIndex2{2}, Tuple{Int64, Int64, Int64}}}
│ %77 = Base.bitcast(UInt64, 1)::UInt64
│ %78 = Base.sub_int(%77, 0x0000000000000001)::UInt64
│ %79 = Base.arraylen(src)::Int64
│ %80 = Base.sle_int(0, %79)::Bool
│ %81 = Base.bitcast(UInt64, %79)::UInt64
│ %82 = Base.ult_int(%78, %81)::Bool
│ %83 = Base.and_int(%80, %82)::Bool
└─── goto #12 if not %83 Looks like we messes up at |
|
aviatesk
added a commit
that referenced
this issue
Dec 6, 2021
…prop' callsite Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
Thanks for the bisect. Will be fixed by #43347. |
aviatesk
added a commit
that referenced
this issue
Dec 14, 2021
…prop' callsite Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
aviatesk
added a commit
that referenced
this issue
Jan 5, 2022
…prop' callsite Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
aviatesk
added a commit
that referenced
this issue
Jan 5, 2022
…prop' callsite (#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
aviatesk
added a commit
that referenced
this issue
Jan 5, 2022
…prop' callsite (#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
aviatesk
added a commit
that referenced
this issue
Jan 5, 2022
…prop' callsite (#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
aviatesk
added a commit
that referenced
this issue
Jan 5, 2022
…prop' callsite (#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from #43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes #43287
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Feb 22, 2022
…prop' callsite (JuliaLang#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from JuliaLang#43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes JuliaLang#43287
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
…prop' callsite (JuliaLang#43347) Makes full use of constant-propagation, by addressing this [TODO](https://github.com/JuliaLang/julia/blob/00734c5fd045316a00d287ca2c0ec1a2eef6e4d1/base/compiler/ssair/inlining.jl#L1212). Here is a performance improvement from JuliaLang#43287: ```julia ulia> using BenchmarkTools julia> X = rand(ComplexF32, 64, 64); julia> dst = reinterpret(reshape, Float32, X); julia> src = copy(dst); julia> @Btime copyto!($dst, $src); 50.819 μs (1 allocation: 32 bytes) # v1.6.4 41.081 μs (0 allocations: 0 bytes) # this commit ``` fixes JuliaLang#43287
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
It looks like a potential type inference issue
Profiling the code shows that it's hitting the fallback dual-iterator implementation version and a slow Tuple iterator
julia/base/abstractarray.jl
Lines 1041 to 1047 in d16f480
julia/base/tuple.jl
Line 88 in d16f480
Downstream JuliaImages issues: JuliaImages/Images.jl#992 JuliaImages/ImageCore.jl#174 (cc: @etibarg @timholy)
The text was updated successfully, but these errors were encountered: