Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize atomic floating-point operations #33325

Open
eschnett opened this issue Sep 19, 2019 · 2 comments
Open

Optimize atomic floating-point operations #33325

eschnett opened this issue Sep 19, 2019 · 2 comments
Labels
atomics llvm For issues that relate to LLVM performance Must go faster

Comments

@eschnett
Copy link
Contributor

LLVM 9 provides built-ins for atomic floating-point operations (see http://releases.llvm.org/9.0.0/docs/ReleaseNotes.html). Julia should use these in Base/atomics.jl, as they are likely faster than the current implementation using atomic_cas!.

@brenhinkeller brenhinkeller added the llvm For issues that relate to LLVM label Nov 20, 2022
@vchuravy
Copy link
Sponsor Member

vchuravy commented Jun 6, 2023

Atomic floating-point operations are not supported by all backends so we would need an atomic-expand pass for them

@gbaraldi
Copy link
Member

gbaraldi commented Jun 6, 2023

I think we currently lower all atomics to CAS loops, #45122 is an attempt at not doing that, but it had some issues. And yeah, we would need to teach it to fall back to the CAS if it's not supported (I'm not sure LLVM is able to do that by itself)

@vchuravy vchuravy changed the title Optimize atomic operations with LLVM 9 Optimize atomic floating-point operations Jun 6, 2023
@vchuravy vchuravy added the performance Must go faster label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atomics llvm For issues that relate to LLVM performance Must go faster
Projects
None yet
Development

No branches or pull requests

4 participants