diff options
author | Sanjoy Das <sanjoy@google.com> | 2018-08-22 13:38:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-22 13:46:02 -0700 |
commit | 4f7a169a7eb97ea4819217f14705d6c2bd125355 (patch) | |
tree | 72580949f841de30c0c3e03e04a63d5dab1867d2 /tensorflow/docs_src | |
parent | e32ef6c18ccfa4dab3751feee08a0659cc63b2a7 (diff) |
[XLA] Define integer division overflow for CPU/GPU
This implements the semantics suggested in cr/209704042 for CPU and GPU:
X / 0 == -1
X % 0 == X
INT_SMIN / -1 = INT_SMIN
INT_SMIN % -1 = 0
PiperOrigin-RevId: 209821097
Diffstat (limited to 'tensorflow/docs_src')
-rw-r--r-- | tensorflow/docs_src/performance/xla/operation_semantics.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/docs_src/performance/xla/operation_semantics.md b/tensorflow/docs_src/performance/xla/operation_semantics.md index 2de30d1b3d..c23a7ad9e2 100644 --- a/tensorflow/docs_src/performance/xla/operation_semantics.md +++ b/tensorflow/docs_src/performance/xla/operation_semantics.md @@ -1036,6 +1036,10 @@ different ranks are *not* supported, unless one of the operands is a scalar. When `Op` is `Rem`, the sign of the result is taken from the dividend, and the absolute value of the result is always less than the divisor's absolute value. +Integer division overflow (signed/unsigned division/remainder by zero or signed +divison/remainder of `INT_SMIN` with `-1`) produces an implementation defined +value. + An alternative variant with different-rank broadcasting support exists for these operations: |