@atomic is fragile due to bypassing getindex machinery
- Dominant language
- Julia
- Stars
- 1.4k
- Forks
- 281
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 30
Description
Compare
```
julia> @cuda ((a)->(a[2] = 42; nothing))(CuArray{Int}(undef, 1))
julia> using CUDAdrv
julia> CUDAdrv.synchronize()
ERROR: a exception was thrown during kernel execution.
Run Julia on debug level 2 for device stack traces.
ERROR: CUDA error: an illegal instruction was encountered (code #715, ERROR_ILLEGAL_INSTRUCTION)
Stacktrace:
[1] macro expansion at /home/tim/Julia/pkg/CUDAdrv/src/base.jl:145 [inlined]
[2] synchronize(::CuContext) at /home/tim/Julia/pkg/CUDAdrv/src/context.jl:196 (repeats 2 times)
[3] top-level scope at REPL[8]:1
```
vs
```
julia> @cuda ((a)->(CUDAnative.@atomic a[2] += 42; nothing))(CuArray{Int}(undef, 1))
julia> CUDAdrv.synchronize()
julia>
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.