-
Notifications
You must be signed in to change notification settings - Fork 41
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
Update atomic memory model text #204
Update atomic memory model text #204
Conversation
Clarify the various cases that violate atomicity. There should be no semantic changes. Signed-off-by: James Dinan <[email protected]>
content/memory_model.tex
Outdated
exclusivity when concurrent accesses to the same location are performed using | ||
\openshmem atomic operations using different datatypes, when non-atomic | ||
\openshmem operations are used to access the given location, or when | ||
non-\openshmem operations are performed on the given location. The result in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add: "(e.g. load and store operations)"
content/memory_model.tex
Outdated
concurrent accesses to the same location by \openshmem atomic operations using | ||
the same datatype will be exclusive. However, they do not guarantee | ||
exclusivity when concurrent accesses to the same location are performed using | ||
\openshmem atomic operations using different datatypes, when non-atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add wait/test with same datatype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdinan, you mean to add wait/test with same datatype to the allowed/defined list, correct?
content/memory_model.tex
Outdated
outside. | ||
\openshmem contains a number of routines that perform atomic operations on | ||
symmetric data objects (Section \ref{sec:amo}). These routines guarantee that | ||
concurrent accesses to the same location by \openshmem atomic operations using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add: "and atomic-compatible operations"?
content/memory_model.tex
Outdated
\openshmem contains a number of routines that perform atomic operations on | ||
symmetric data objects (Section \ref{sec:amo}). These routines guarantee that | ||
concurrent accesses to the same location by \openshmem atomic operations using | ||
the same datatype will be exclusive. However, they do not guarantee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of "datatype" reference the table in the AMO section and use consistent terminology.
Signed-off-by: James Dinan <[email protected]>
Requesting committee feedback on the updated draft: osh-6ad7676.pdf. |
Feedback from May 21 reading:
|
C11 specifies that "The size, representation, and alignment of an atomic type need not be the same as those of the corresponding unqualified type." OpenSHMEM operations on such types are therefore not well-defined, so C11 atomics won't work in example 3. |
Signed-off-by: James Dinan <[email protected]>
Signed-off-by: James Dinan <[email protected]>
Signed-off-by: James Dinan <[email protected]>
content/memory_model.tex
Outdated
Section~\ref{subsec:p2p_intro}. The atomic and atomic compatible routines | ||
guarantee that concurrent accesses by any of these routines to the same | ||
location and using the same datatype (specified in Tables~\ref{stdamotypes} and | ||
\ref{extamotypes}) will be exclusive. In contrast to atomic operations, atomic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short
and unsigned short
is supported by wait_until
(not supported in amotypes); float
and double
are the other non-overlapping types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text is intended to specify semantics for atomics, so those types shouldn't really come into play. But, I see your point that as it's written, it also specifies semantics for overlapping wait operations without atomics. How about splitting these cases up:
The atomic routines guarantee that concurrent accesses by any of these routines to the same location and using the same datatype (specified in Tables~\ref{stdamotypes} and \ref{extamotypes}) will be exclusive. Similarly, concurrent accesses by atomic and atomic compatible routines to the same location and using the same datatype will also be exclusive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up question : will there be a usecase for short
and unsigned short
if the amo APIs end up being the only way to signal wait_until
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, InfiniBand doesn't have hardware support for 8- and 16-bit atomics. That's one argument in favor supporting scalar put with the wait operations..
July 23rd Meeting Notes: Ballot postponed |
Atomic completion of
|
@shamisp @BryantLam Let's discuss this at the next RMA WG meeting. The purpose of this ticket is only to clarify existing semantics (broken or not). Restricting the behavior of I'm fine with moving the concurrency definition to a terms section. Can we handle this separately as part of #228? |
Agree with this. As I mentioned on the call, we need to converge this definition with what @anshumang and @spotluri are proposing in #232 and #233 . |
@manjugv Which definition are you referring to? The definition of concurrency? Update: I see #229 mentions incorporating this definition for concurrency. Given that the memory model has not yet gelled, I'd like to suggest ratifying/merging this ticket to close out these changes and allow that ticket to integrate them in time for their reading. |
Signed-off-by: James Dinan <[email protected]>
@jdinan I see it as an integral part of memory model. |
@shamisp Can you spot me a couple more words? I'm not sure how to interpret your feedback, and github comments are wonderfully context-free. |
Feedback from Aug. 2 WG meeting: remove concurrency definition and atomic compatible; handle these as part of the memory model proposal. |
To be handled in a future proposal. Signed-off-by: James Dinan <[email protected]>
BTW, the "left shift" comment in example 1 strikes me as questionable advice given that the original code has different behaviors depending on the endianness of the system it's running on. Do we want to change that bit to something like: "For example, the 32-bit value can be left-shifted and a 64-bit atomic OR operation can be used."? |
@jdinan looks good to me. |
Clarify the various cases that violate atomicity. There should be no semantic changes.
Closes #172