You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playing around with Metal I can across some unexpected behavior with OffsetArrays of MtlArrays concerning deepcopy:
julia> a =MtlArray(zeros(Float32, 2));
julia> a =OffsetArray(a, -1);
julia> b =deepcopy(a);
julia>fill!(b, 1);
julia> a
2-element OffsetArray(::MtlVector{Float32, Metal.PrivateStorage}, 0:1) with eltype Float32 with indices 0:1:1.01.0
Note that this does not happen on pure MtlArrays
julia> a =MtlArray(zeros(Float32, 2));
julia> b =deepcopy(a);
julia>fill!(b, 1);
julia> a
4-element OffsetArray(::MtlVector{Float32, Metal.PrivateStorage}, 0:3) with eltype Float32 with indices 0:3:0.00.0
Nor with OffsetArrays of other types:
julia> a =OffsetArray(zeros(2), -1);
julia> b =deepcopy(a);
julia>fill!(b, 1);
julia> a
2-element OffsetArray(::Vector{Float64}, 0:1) with eltype Float64 with indices 0:1:0.00.0
The text was updated successfully, but these errors were encountered:
Playing around with Metal I can across some unexpected behavior with
OffsetArray
s ofMtlArray
s concerningdeepcopy
:Note that this does not happen on pure
MtlArray
sNor with
OffsetArray
s of other types:The text was updated successfully, but these errors were encountered: