JuliaConcurrent / Atomix.jl

https://juliaconcurrent.github.io/Atomix.jl/dev/
MIT License
20 stars 0 forks source link

backporting `@atomic` macro from julia-1.12 #38

Open kalmarek opened 2 months ago

kalmarek commented 2 months ago

pull: https://github.com/JuliaLang/julia/pull/54707 It requires GenericMemory which landed only in julia-1.11, so the backport will be only limited in scope.

@vchuravy how do you envision such a backport?

vchuravy commented 2 months ago

So one idea would be to "simply" @static if and have Atomix just re-export @atomic from Julia Base.

This will likely cause issue with Atomix usage in KernelAbstractions and the GPU backends. One would also need to make sure that the semantics of @atomic match between Base and Atomix.

Alternativly replace the implementation for the CPU in Atomix on 1.12 with direct calls to the Memory related pieces.