JuliaGPU / JuliaGPU/KernelAbstractions.jl

eps(::AbstractFloat) inside a kernel doesn't compile on Julia 1.5.1

Open
#127 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
523
Forks
88
Avg merge
1d 11h
Merged PRs (30d)
25

Description

See the title. Works in a `CUDA` kernel and in `KA` on Julia 1.4.1.

MWE
```
using CUDA
using KernelAbstractions

function cuda_kernel(A)
@inbounds A[1] = eps(A[1])
nothing
end

@kernel function ka_kernel(A)
@inbounds A[1] = eps(A[1])
end

let
A = CuArray(ones(1))
@cuda cuda_kernel(A)
@show Array(A)

fill!(A, 1)
wait(ka_kernel(CUDADevice(), 1, 1)(A))
@show Array(A)
end

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the Julia 1.5.1 MWE from the issue and compare the direct @cuda path with the KernelAbstractions CUDADevice path. Trace the path responsible for compiling eps(::AbstractFloat) in the kernel, then add a regression check showing the affected kernel compiles and runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.