JuliaConcurrent / UnsafeAtomics.jl

MIT License
4 stars 1 forks source link

Use atomic_pointer* methods when available #14

Closed jpsamaroo closed 2 days ago

jpsamaroo commented 8 months ago

Todo:

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 47.36842% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 81.66%. Comparing base (934c34d) to head (0953048).

Files Patch % Lines
src/core.jl 47.36% 10 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #14 +/- ## =========================================== - Coverage 98.00% 81.66% -16.34% =========================================== Files 4 4 Lines 50 60 +10 =========================================== Hits 49 49 - Misses 1 11 +10 ``` | [Flag](https://app.codecov.io/gh/JuliaConcurrent/UnsafeAtomics.jl/pull/14/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaConcurrent) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/JuliaConcurrent/UnsafeAtomics.jl/pull/14/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaConcurrent) | `81.66% <47.36%> (-16.34%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaConcurrent#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

willow-ahrens commented 3 weeks ago

I'm curious, on my machine I'm noticing that the llvm approach is faster than the atomic_pointermodify approach. Is this expected? Do you plan to continue using this package as Julia begins to provide more atomic operations?

vchuravy commented 2 days ago

I'm curious, on my machine I'm noticing that the llvm approach is faster than the atomic_pointermodify approach. Is this expected? Do you plan to continue using this package as Julia begins to provide more atomic operations?

That isn't expected... Do you have a MWE?

vchuravy commented 2 days ago

I'm curious, on my machine I'm noticing that the llvm approach is faster than the atomic_pointermodify approach. Is this expected? Do you plan to continue using this package as Julia begins to provide more atomic operations?

Actually it is expected, this PR got never merged :/

https://github.com/JuliaLang/julia/pull/45122

willow-ahrens commented 2 days ago

Ah, that's unfortunate! It would be great if Julia had better support for atomic increment. Do we know if anything is planned for future versions?

vchuravy commented 2 days ago

Do we know if anything is planned for future versions?

I will try to find some time to update the old PR.

jpsamaroo commented 2 days ago

Thanks for getting this fixed up and merged! ❤️

willow-ahrens commented 1 day ago

Yes, thanks! I'm currently working on parallelizing Finch and this package has been integral to getting the peak performance.