-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
For example CUDA.atomic_xchg!
exists yet it isn't called by Atomic.modify!
.
Changing this function by adding two lines does the trick:
@inline function Atomix.modify!(ref::CuIndexableRef, op::OP, x, order) where {OP}
# ...
elseif op === Atomix.right
CUDA.atomic_xchg!(ptr, x)
# ...
end
I do not know if this is supported by the other GPU backends.
There is also the case of Atomix.get!
and Atomix.set!
which aren't supported. There is no direct equivalent in CUDA, but doing a CUDA.atomic_add!(x, 0)
works like a load and CUDA.atomic_xchg!(x, y)
works as a store. Would it be better to use those until there is a nicer solution?
Metadata
Metadata
Assignees
Labels
No labels