KernelAbstractions.jl icon indicating copy to clipboard operation
KernelAbstractions.jl copied to clipboard

1.11: reduce_private test generates gcframe under --check-bounds=yes

Open maleadt opened this issue 1 year ago • 1 comments

MWE, reduced from the tests:

using KernelAbstractions

@kernel function reduce_private(out, A)
    I = @index(Global, NTuple)
    i = @index(Local)

    priv = @private eltype(A) (1,)
    @inbounds begin
        priv[1] = zero(eltype(A))
        for k in 1:size(A, ndims(A))
            priv[1] += A[I..., k]
        end
        out[I...] = priv[1]
    end
end

KernelAbstractions.ka_code_llvm(
    reduce_private(CPU(), (8,)), Tuple{Array{Float64, 1}, Array{Float64, 2}},
    optimize=true, ndrange = (64,), debuginfo=:none
)

This generates a gcframe (the absence of which is being tested) when running on 1.11 under --check-bounds=yes, as done by Pkg.

maleadt avatar Sep 17 '24 10:09 maleadt