Guard float64 atomic add for CUDA with GOOGLE_CUDA macro#3175
Open
hsharsha wants to merge 1 commit intodevelop-upstreamfrom
Open
Guard float64 atomic add for CUDA with GOOGLE_CUDA macro#3175hsharsha wants to merge 1 commit intodevelop-upstreamfrom
hsharsha wants to merge 1 commit intodevelop-upstreamfrom
Conversation
mmakevic-amd
approved these changes
Mar 3, 2026
nurmukhametov
approved these changes
Mar 4, 2026
62972ea to
892fece
Compare
i-chaochen
approved these changes
Mar 4, 2026
Collaborator
i-chaochen
left a comment
There was a problem hiding this comment.
Thanks! Can you upstream this as well. Although we know it might take a long while to be accepted in TF upstream....let's put a PR at least..
i-chaochen
reviewed
Mar 4, 2026
| return detail::GpuAtomicCasHelper(ptr, | ||
| [value](double a) { return a + value; }); | ||
| } | ||
| #endif |
Collaborator
There was a problem hiding this comment.
I guess we need to add // CUDA_ARCH < 600 for this #endif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Put cuda specific code under GOOGLE_CUDA macro
Solves slowness seen as reported int https://amd-hub.atlassian.net/browse/ROCM-3072
Submission Checklist