Skip to content

Commit

Permalink
reductions: fix text for associative binary ops
Browse files Browse the repository at this point in the history
  • Loading branch information
davidozog committed Aug 30, 2024
1 parent 6573d12 commit 1635557
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion content/programming_model_overview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
of concatenated symmetric objects contributed by each of the \acp{PE} in
another symmetric data object.
\item \OPR{Reduction}: All \acp{PE} participating in the routine get the result
of an associative binary routine over elements of the specified symmetric
of a binary operation over elements of the specified symmetric
data object on another symmetric data object.
\item \OPR{All-to-All}: All \acp{PE} participating in the routine exchange
a fixed amount of contiguous or strided data with all other \acp{PE}
Expand Down
15 changes: 13 additions & 2 deletions content/shmem_reductions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ \subsubsubsection{PROD}
\apidescription{
\openshmem reduction routines are collective routines over an
existing \openshmem team that compute one or more reductions across symmetric
arrays on multiple \acp{PE}. A reduction performs an associative binary routine
arrays on multiple \acp{PE}. A reduction performs an binary operation
across a set of values.

The \VAR{nreduce} argument determines the number of separate reductions to
Expand Down Expand Up @@ -311,7 +311,7 @@ \subsubsubsection{PROD}
\begin{DeprecateBlock}
\openshmem reduction routines are collective routines over an active set
that compute one or more reductions across symmetric
arrays on multiple \acp{PE}. A reduction performs an associative binary routine
arrays on multiple \acp{PE}. A reduction performs an binary operation
across a set of values.

The \VAR{nreduce} argument determines the number of separate reductions to
Expand Down Expand Up @@ -366,6 +366,17 @@ \subsubsubsection{PROD}
when \CONST{\_\_STDC\_NO\_COMPLEX\_\_} is defined to 1}, an \openshmem
implementation is not required to provide support for these
complex-typed interfaces.

The binary operations performed by \openshmem reductions are intended to be
associative and commutative for utility and reproducibility, but in
practice these properties are not strictly required.
When applying a reduction to floating-point numbers, the binary operation
may not be exactly associative and/or commutative due to the inherent
inaccuracies of floating-point arithmetic caused by rounding errors and
finite precision.
This can lead to slight variations in the result of \openshmem reductions
on floating-point datatypes, especially when the number of elements is
large and/or when values have highly varying magnitudes.
}

\apireturnvalues{
Expand Down

0 comments on commit 1635557

Please sign in to comment.