From 9f355d9bfd53f86da547f742f6483065d8339f1d Mon Sep 17 00:00:00 2001 From: "Zhang, Wuxun" Date: Fri, 19 May 2023 14:03:48 +0800 Subject: [PATCH 1/3] fix wrong argument names --- .../elements/oneDNN/source/graph/ops/Add.rst | 14 ++++----- .../graph/ops/BatchNormTrainingBackward.rst | 14 ++++----- .../oneDNN/source/graph/ops/ClampBackward.rst | 14 ++++----- .../oneDNN/source/graph/ops/Concat.rst | 14 ++++----- .../oneDNN/source/graph/ops/Divide.rst | 14 ++++----- .../oneDNN/source/graph/ops/EluBackward.rst | 28 ++++++++--------- .../oneDNN/source/graph/ops/Interpolate.rst | 14 ++++----- .../source/graph/ops/InterpolateBackward.rst | 14 ++++----- .../source/graph/ops/LogSoftmaxBackward.rst | 19 ++++++------ .../oneDNN/source/graph/ops/Maximum.rst | 14 ++++----- .../oneDNN/source/graph/ops/Minimum.rst | 14 ++++----- .../oneDNN/source/graph/ops/Multiply.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReLUBackward.rst | 14 ++++----- .../oneDNN/source/graph/ops/Reciprocal.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceL1.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceL2.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceMax.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceMean.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceMin.rst | 24 +++++++-------- .../oneDNN/source/graph/ops/ReduceProd.rst | 14 ++++----- .../oneDNN/source/graph/ops/ReduceSum.rst | 14 ++++----- .../source/graph/ops/SigmoidBackward.rst | 14 ++++----- .../oneDNN/source/graph/ops/Softmax.rst | 26 ++++++++-------- .../source/graph/ops/SoftmaxBackward.rst | 30 +++++++++---------- .../oneDNN/source/graph/ops/SqrtBackward.rst | 14 ++++----- .../source/graph/ops/SquaredDifference.rst | 12 ++++---- .../oneDNN/source/graph/ops/Subtract.rst | 14 ++++----- .../oneDNN/source/graph/ops/TanhBackward.rst | 14 ++++----- 28 files changed, 223 insertions(+), 224 deletions(-) diff --git a/source/elements/oneDNN/source/graph/ops/Add.rst b/source/elements/oneDNN/source/graph/ops/Add.rst index 3e061e283..cc48b1103 100644 --- a/source/elements/oneDNN/source/graph/ops/Add.rst +++ b/source/elements/oneDNN/source/graph/ops/Add.rst @@ -68,10 +68,10 @@ Supported Data Types Add operation supports the following data type combinations. -========= =========== -Source0/1 Destination -========= =========== -f32 f32 -bf16 bf16 -f16 f16 -========= =========== +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/BatchNormTrainingBackward.rst b/source/elements/oneDNN/source/graph/ops/BatchNormTrainingBackward.rst index 95d074da3..6a981eafa 100644 --- a/source/elements/oneDNN/source/graph/ops/BatchNormTrainingBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/BatchNormTrainingBackward.rst @@ -78,10 +78,10 @@ Supported Data Types BatchNormTrainingBackward operation supports the following data type combinations. -==================== ================================================ -Src / Diff_dst / Dst Mean / Variance / Gamma / Diff_gamma / Diff_beta -==================== ================================================ -f32 f32 -bf16 f32, bf16 -f16 f32 -==================== ================================================ +========================= ================================================ +Src / Diff_dst / Diff_src Mean / Variance / Gamma / Diff_gamma / Diff_beta +========================= ================================================ +f32 f32 +bf16 f32, bf16 +f16 f32 +========================= ================================================ diff --git a/source/elements/oneDNN/source/graph/ops/ClampBackward.rst b/source/elements/oneDNN/source/graph/ops/ClampBackward.rst index a16902442..676ab06e3 100644 --- a/source/elements/oneDNN/source/graph/ops/ClampBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/ClampBackward.rst @@ -93,10 +93,10 @@ Supported Data Types ClampBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== diff --git a/source/elements/oneDNN/source/graph/ops/Concat.rst b/source/elements/oneDNN/source/graph/ops/Concat.rst index 5ebf17380..fe03adb8b 100644 --- a/source/elements/oneDNN/source/graph/ops/Concat.rst +++ b/source/elements/oneDNN/source/graph/ops/Concat.rst @@ -69,10 +69,10 @@ Supported Data Types Concat operation supports the following data type combinations. -==== ==== -Src Dst -==== ==== -f32 f32 -bf16 bf16 -f16 f16 -==== ==== +===== ==== +Src_i Dst +===== ==== +f32 f32 +bf16 bf16 +f16 f16 +===== ==== diff --git a/source/elements/oneDNN/source/graph/ops/Divide.rst b/source/elements/oneDNN/source/graph/ops/Divide.rst index 0a51982ef..c90367a86 100644 --- a/source/elements/oneDNN/source/graph/ops/Divide.rst +++ b/source/elements/oneDNN/source/graph/ops/Divide.rst @@ -69,10 +69,10 @@ Supported Data Types Divide operation supports the following data type combinations. -======== ========= -Diff_dst Diff_bias -======== ========= -f32 f32 -bf16 bf16 -f16 f16 -======== ========= +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/EluBackward.rst b/source/elements/oneDNN/source/graph/ops/EluBackward.rst index a1559d0a7..4584c0d9a 100644 --- a/source/elements/oneDNN/source/graph/ops/EluBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/EluBackward.rst @@ -25,7 +25,7 @@ Operation Attributes +----------------+-------------+------------+--------------+-------------+ | |attr_use_dst| | If true, | bool | ``true`` | Optional | | | use | | (default), | | -| | \diffsrc | | ``false`` | | +| | \dst | | ``false`` | | | | of Elu | | | | | | operation | | | | | | to | | | | @@ -47,12 +47,12 @@ Inputs ====== -===== ============= ==================== -Index Argument Name Required or Optional -===== ============= ==================== -0 ``src`` Required -1 ``diff_dst`` Required -===== ============= ==================== +===== ================= ==================== +Index Argument Name Required or Optional +===== ================= ==================== +0 ``src`` / ``dst`` Required +1 ``diff_dst`` Required +===== ================= ==================== Outputs ======= @@ -70,10 +70,10 @@ Supported Data Types EluBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== diff --git a/source/elements/oneDNN/source/graph/ops/Interpolate.rst b/source/elements/oneDNN/source/graph/ops/Interpolate.rst index 53ddd3008..a4edd8b38 100644 --- a/source/elements/oneDNN/source/graph/ops/Interpolate.rst +++ b/source/elements/oneDNN/source/graph/ops/Interpolate.rst @@ -111,10 +111,10 @@ Supported Data Types Interpolate operation supports the following data type combinations. -======= ===== -Src/Dst Sizes -======= ===== -f32 s32 -bf16 s32 -f16 s3 -======= ===== +========= ===== +Src / Dst Sizes +========= ===== +f32 s32 +bf16 s32 +f16 s32 +========= ===== diff --git a/source/elements/oneDNN/source/graph/ops/InterpolateBackward.rst b/source/elements/oneDNN/source/graph/ops/InterpolateBackward.rst index d35ea0066..83f4cbf9f 100644 --- a/source/elements/oneDNN/source/graph/ops/InterpolateBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/InterpolateBackward.rst @@ -113,10 +113,10 @@ Supported Data Types InterpolateBackward operation supports the following data type combinations. -===================== ===== -Src/Diff_dst/Diff_src Sizes -===================== ===== -f32 s32 -bf16 s32 -f16 s32 -===================== ===== +==== ======== ======== ===== +Src Diff_dst Diff_src Sizes +==== ======== ======== ===== +f32 f32 f32 s32 +bf16 bf16 bf16 s32 +f16 f16 f16 s32 +==== ======== ======== ===== diff --git a/source/elements/oneDNN/source/graph/ops/LogSoftmaxBackward.rst b/source/elements/oneDNN/source/graph/ops/LogSoftmaxBackward.rst index a6c9ff674..16b5cfc62 100644 --- a/source/elements/oneDNN/source/graph/ops/LogSoftmaxBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/LogSoftmaxBackward.rst @@ -39,7 +39,7 @@ Inputs Index Argument Name Required or Optional ===== ============= ==================== 0 ``diff_dst`` Required -1 ``src`` Required +1 ``dst`` Required ===== ============= ==================== Outputs @@ -56,13 +56,12 @@ Index Argument Name Required or Optional Supported Data Types ******************** -LogSoftmaxBackward operation supports the following data type -combinations. +LogSoftmaxBackward operation supports the following data type combinations. -==== ==== -Src Dst -==== ==== -f32 f32 -bf16 bf16 -f16 f16 -==== ==== +======== ==== ======== +Diff_dst Dst Diff_src +======== ==== ======== +f32 f32 f32 +bf16 bf16 bf16 +f16 f16 f16 +======== ==== ======== diff --git a/source/elements/oneDNN/source/graph/ops/Maximum.rst b/source/elements/oneDNN/source/graph/ops/Maximum.rst index 8f91e8afb..933209ecb 100644 --- a/source/elements/oneDNN/source/graph/ops/Maximum.rst +++ b/source/elements/oneDNN/source/graph/ops/Maximum.rst @@ -69,10 +69,10 @@ Supported Data Types Maximum operation supports the following data type combinations. -========= =========== -Source0/1 Destination -========= =========== -f32 f32 -bf16 bf16 -f16 f16 -========= =========== +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/Minimum.rst b/source/elements/oneDNN/source/graph/ops/Minimum.rst index 5264db38d..36fc8ddb1 100644 --- a/source/elements/oneDNN/source/graph/ops/Minimum.rst +++ b/source/elements/oneDNN/source/graph/ops/Minimum.rst @@ -69,10 +69,10 @@ Supported Data Types Minimum operation supports the following data type combinations. -========= =========== -Source0/1 Destination -========= =========== -f32 f32 -bf16 bf16 -f16 f16 -========= =========== +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/Multiply.rst b/source/elements/oneDNN/source/graph/ops/Multiply.rst index 10216bf3c..f29e1919d 100644 --- a/source/elements/oneDNN/source/graph/ops/Multiply.rst +++ b/source/elements/oneDNN/source/graph/ops/Multiply.rst @@ -70,10 +70,10 @@ Supported Data Types Multiply operation supports the following data type combinations. -========= =========== -Source0/1 Destination -========= =========== -f32 f32 -bf16 bf16 -f16 f16 -========= =========== +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReLUBackward.rst b/source/elements/oneDNN/source/graph/ops/ReLUBackward.rst index 34d700218..6eec1f2a2 100644 --- a/source/elements/oneDNN/source/graph/ops/ReLUBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/ReLUBackward.rst @@ -63,10 +63,10 @@ Supported Data Types ReLUBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== diff --git a/source/elements/oneDNN/source/graph/ops/Reciprocal.rst b/source/elements/oneDNN/source/graph/ops/Reciprocal.rst index 22d4ea5af..7de9cc765 100644 --- a/source/elements/oneDNN/source/graph/ops/Reciprocal.rst +++ b/source/elements/oneDNN/source/graph/ops/Reciprocal.rst @@ -55,10 +55,10 @@ Supported Data Types Reciprocal operation supports the following data type combinations. -====== =========== -Source Destination -====== =========== -f32 f32 -bf16 bf16 -f16 f16 -====== =========== +==== ==== +Src Dst +==== ==== +f32 f32 +bf16 bf16 +f16 f16 +==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceL1.rst b/source/elements/oneDNN/source/graph/ops/ReduceL1.rst index 4ececf4b5..2a14bef1f 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceL1.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceL1.rst @@ -126,10 +126,10 @@ Supported Data Types ReduceL1 operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceL2.rst b/source/elements/oneDNN/source/graph/ops/ReduceL2.rst index b10e4af1f..2ee94f8bc 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceL2.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceL2.rst @@ -126,10 +126,10 @@ Supported Data Types ReduceL2 operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceMax.rst b/source/elements/oneDNN/source/graph/ops/ReduceMax.rst index d25d1ab55..092a3a9ee 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceMax.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceMax.rst @@ -125,10 +125,10 @@ Supported Data Types ReduceMax operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceMean.rst b/source/elements/oneDNN/source/graph/ops/ReduceMean.rst index 342467ccc..65f8ec494 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceMean.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceMean.rst @@ -124,10 +124,10 @@ Supported Data Types ReduceMean operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceMin.rst b/source/elements/oneDNN/source/graph/ops/ReduceMin.rst index f3b4d3038..ab10151fc 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceMin.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceMin.rst @@ -99,10 +99,10 @@ Index Argument Name Required or Optional 1 ``axes`` Optional ===== ============= ==================== -@note ``axes`` is an 1-D tensor specifying the axis along which the -reduction is performed. 1D tensor of unique elements. The range of -elements is [-r, r-1], where r is the rank of src tensor. Exactly one of -attribute axes and the second input tensor axes should be available. +@note ``axes`` is a 1-D tensor specifying the axis along which the reduction is +performed. 1D tensor of unique elements. The range of elements is [-r, r-1], +where r is the rank of src tensor. Exactly one of attribute axes and the second +input tensor axes should be available. Outputs ======= @@ -115,7 +115,7 @@ Index Argument Name Required or Optional ===== ============= ==================== @note The result of ReduceMin function applied to src tensor. shape[i] = -shapeOf(data)[i] for all i that is not in the list of axes from the +shapeOf[data](i) for all i that is not in the list of axes from the second input. For dimensions from axes, shape[i] == 1 if keep_dims == True, or i-th dimension is removed from the dst otherwise. @@ -125,10 +125,10 @@ Supported Data Types ReduceMin operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceProd.rst b/source/elements/oneDNN/source/graph/ops/ReduceProd.rst index 346a4000a..3b6def4db 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceProd.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceProd.rst @@ -125,10 +125,10 @@ Supported Data Types ReduceProd operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/ReduceSum.rst b/source/elements/oneDNN/source/graph/ops/ReduceSum.rst index 8f6d93837..64bc63d47 100644 --- a/source/elements/oneDNN/source/graph/ops/ReduceSum.rst +++ b/source/elements/oneDNN/source/graph/ops/ReduceSum.rst @@ -125,10 +125,10 @@ Supported Data Types ReduceSum operation supports the following data type combinations. -================== ==== -Source/Destination Axes -================== ==== -f32 s32 -bf16 s32 -f16 s32 -================== ==== +==== ==== ==== +Src Dst Axes +==== ==== ==== +f32 f32 s32 +bf16 bf16 s32 +f16 f16 s32 +==== ==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/SigmoidBackward.rst b/source/elements/oneDNN/source/graph/ops/SigmoidBackward.rst index 956c899a3..022ec1dc8 100644 --- a/source/elements/oneDNN/source/graph/ops/SigmoidBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/SigmoidBackward.rst @@ -63,10 +63,10 @@ Supported Data Types SigmoidBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== diff --git a/source/elements/oneDNN/source/graph/ops/Softmax.rst b/source/elements/oneDNN/source/graph/ops/Softmax.rst index 0814c81b8..72c8af958 100644 --- a/source/elements/oneDNN/source/graph/ops/Softmax.rst +++ b/source/elements/oneDNN/source/graph/ops/Softmax.rst @@ -5,10 +5,10 @@ .. include:: ../../replacements.inc.rst -Softmax +SoftMax ####### -Softmax operation applies following formula on every element of +SoftMax operation applies the following formula on every element of \src tensor (the variable names follow the standard :ref:`conventions-label`): .. math:: @@ -20,16 +20,16 @@ where \$ C \$ is a size of tensor along axis dimension. Operation Attributes ******************** -+-------------+-------------+------------+-----------+-------------+ -| Attribute | Description | Value Type | Supported | Required or | -| Name | | | Values | Optional | -+=============+=============+============+===========+=============+ -| |attr_axis| | Represents | s64 | Arbitrary | Optional | -| | the axis of | | s64 value | | -| | which the | | (``1`` in | | -| | Softmax is | | default) | | -| | calculated. | | | | -+-------------+-------------+------------+-----------+-------------+ ++-------------+---------------+------------+-----------+-------------+ +| Attribute | Description | Value Type | Supported | Required or | +| Name | | | Values | Optional | ++=============+===============+============+===========+=============+ +| |attr_axis| | Represents | s64 | Arbitrary | Optional | +| | the axis from | | s64 value | | +| | which the | | (``1`` in | | +| | SoftMax is | | default) | | +| | calculated. | | | | ++-------------+---------------+------------+-----------+-------------+ Execution Arguments ******************* @@ -61,7 +61,7 @@ Index Argument Name Required or Optional Supported Data Types ******************** -Softmax operation supports the following data type combinations. +SoftMax operation supports the following data type combinations. ==== ==== Src Dst diff --git a/source/elements/oneDNN/source/graph/ops/SoftmaxBackward.rst b/source/elements/oneDNN/source/graph/ops/SoftmaxBackward.rst index 34219fe7e..2573c8fc9 100644 --- a/source/elements/oneDNN/source/graph/ops/SoftmaxBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/SoftmaxBackward.rst @@ -5,24 +5,24 @@ .. include:: ../../replacements.inc.rst -SoftmaxBackward +SoftMaxBackward ############### -SoftmaxBackward operation computes gradient for Softmax. +SoftMaxBackward operation computes gradient for SoftMax. Operation Attributes ******************** -+-------------+-------------+------------+-----------+-------------+ -| Attribute | Description | Value Type | Supported | Required or | -| Name | | | Values | Optional | -+=============+=============+============+===========+=============+ -| |attr_axis| | Represents | s64 | Arbitrary | Optional | -| | the axis of | | s64 value | | -| | which the | | (``1`` in | | -| | Softmax is | | default) | | -| | calculated. | | | | -+-------------+-------------+------------+-----------+-------------+ ++-------------+---------------+------------+-----------+-------------+ +| Attribute | Description | Value Type | Supported | Required or | +| Name | | | Values | Optional | ++=============+===============+============+===========+=============+ +| |attr_axis| | Represents | s64 | Arbitrary | Optional | +| | the axis from | | s64 value | | +| | which the | | (``1`` in | | +| | SoftMax is | | default) | | +| | calculated. | | | | ++-------------+---------------+------------+-----------+-------------+ Execution Arguments ******************* @@ -38,7 +38,7 @@ Inputs Index Argument Name Required or Optional ===== ============= ==================== 0 ``diff_dst`` Required -1 ``src`` Required +1 ``dst`` Required ===== ============= ==================== Outputs @@ -55,10 +55,10 @@ Index Argument Name Required or Optional Supported Data Types ******************** -SoftmaxBackward operation supports the following data type combinations. +SoftMaxBackward operation supports the following data type combinations. ==== ======== ======== -Src Diff_dst Diff_src +Dst Diff_dst Diff_src ==== ======== ======== f32 f32 f32 bf16 bf16 bf16 diff --git a/source/elements/oneDNN/source/graph/ops/SqrtBackward.rst b/source/elements/oneDNN/source/graph/ops/SqrtBackward.rst index ac396b672..c141d9f66 100644 --- a/source/elements/oneDNN/source/graph/ops/SqrtBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/SqrtBackward.rst @@ -62,10 +62,10 @@ Supported Data Types SqrtBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== diff --git a/source/elements/oneDNN/source/graph/ops/SquaredDifference.rst b/source/elements/oneDNN/source/graph/ops/SquaredDifference.rst index 076ae0b57..65008f717 100644 --- a/source/elements/oneDNN/source/graph/ops/SquaredDifference.rst +++ b/source/elements/oneDNN/source/graph/ops/SquaredDifference.rst @@ -12,15 +12,15 @@ SquaredDifference operation performs element-wise subtraction operation with two given tensors applying multi-directional broadcast rules, after that each result of the subtraction is squared. -Before performing arithmetic operation, :math:`src_1` and -:math:`src_2` are broadcasted if their shapes are different and +Before performing arithmetic operation, :math:`src_0` and +:math:`src_1` are broadcasted if their shapes are different and ``auto_broadcast`` attributes is not ``none``. Broadcasting is performed according to ``auto_broadcast`` value. After broadcasting SquaredDifference does the following with the input tensors: .. math:: - \dst_i = (\src\_1_i - \src\_2_i)^2 + \dst_i = (\src\_0_i - \src\_1_i)^2 Operation Attributes ******************** @@ -50,8 +50,8 @@ Inputs ===== ============= ==================== Index Argument Name Required or Optional ===== ============= ==================== -0 ``src_1`` Required -1 ``src_2`` Required +0 ``src_0`` Required +1 ``src_1`` Required ===== ============= ==================== Outputs @@ -71,7 +71,7 @@ SquaredDifference operation supports the following data type combinations. ===== ===== ==== -Src_1 Src_2 Dst +Src_0 Src_1 Dst ===== ===== ==== f32 f32 f32 bf16 bf16 bf16 diff --git a/source/elements/oneDNN/source/graph/ops/Subtract.rst b/source/elements/oneDNN/source/graph/ops/Subtract.rst index f6ebbf759..df9e00f69 100644 --- a/source/elements/oneDNN/source/graph/ops/Subtract.rst +++ b/source/elements/oneDNN/source/graph/ops/Subtract.rst @@ -69,10 +69,10 @@ Supported Data Types Substract operation supports the following data type combinations. -========= =========== -Source0/1 Destination -========= =========== -f32 f32 -bf16 bf16 -f16 f16 -========= =========== +============= ==== +Src_0 / Src_1 Dst +============= ==== +f32 f32 +bf16 bf16 +f16 f16 +============= ==== diff --git a/source/elements/oneDNN/source/graph/ops/TanhBackward.rst b/source/elements/oneDNN/source/graph/ops/TanhBackward.rst index 96f012da0..dccf3344c 100644 --- a/source/elements/oneDNN/source/graph/ops/TanhBackward.rst +++ b/source/elements/oneDNN/source/graph/ops/TanhBackward.rst @@ -62,10 +62,10 @@ Supported Data Types TanhBackward operation supports the following data type combinations. -==== ======== ======== -Src Diff_dst Diff_src -==== ======== ======== -f32 f32 f32 -f16 f16 f16 -bf16 bf16 bf16 -==== ======== ======== +========= ======== ======== +Src / Dst Diff_dst Diff_src +========= ======== ======== +f32 f32 f32 +f16 f16 f16 +bf16 bf16 bf16 +========= ======== ======== From 2bf056fe5a771c5d55d18b006b88b8d41ee50b51 Mon Sep 17 00:00:00 2001 From: "Zhang, Wuxun" Date: Fri, 19 May 2023 14:13:33 +0800 Subject: [PATCH 2/3] add new select op and boolean data type --- .../oneDNN/source/graph/data_model.rst | 3 + .../oneDNN/source/graph/ops/Select.rst | 95 +++++++++++++++++++ .../oneDNN/source/graph/ops/index.rst | 1 + 3 files changed, 99 insertions(+) create mode 100644 source/elements/oneDNN/source/graph/ops/Select.rst diff --git a/source/elements/oneDNN/source/graph/data_model.rst b/source/elements/oneDNN/source/graph/data_model.rst index 5914b789a..7089279b7 100644 --- a/source/elements/oneDNN/source/graph/data_model.rst +++ b/source/elements/oneDNN/source/graph/data_model.rst @@ -39,6 +39,9 @@ it's suggested to refer to the definition page of each operation. u8 8-bit unsigned integer. + + boolean + Boolean data type. Size is C++ implementation defined. oneDNN Graph supports both public layout and |opaque| layout. When the diff --git a/source/elements/oneDNN/source/graph/ops/Select.rst b/source/elements/oneDNN/source/graph/ops/Select.rst new file mode 100644 index 000000000..326b54823 --- /dev/null +++ b/source/elements/oneDNN/source/graph/ops/Select.rst @@ -0,0 +1,95 @@ +.. SPDX-FileCopyrightText: 2023 Intel Corporation +.. +.. SPDX-License-Identifier: CC-BY-4.0 +.. include:: ../../replacements.inc.rst + + +Select +###### + +Select operation returns a tensor filled with the elements from the second or +the third input, depending on the condition (the first input) value. + +.. math:: + \dst[i] = cond[i] ? \src\_0[i] : \src\_1[i] + +Broadcasting is supported. + +If the auto_broadcast attribute is not none, the select operation takes a +two-step broadcast before performing the selection: + +- **Step 1**: Input tensors \src\_0 and \src\_1 are broadcasted to dst_shape + according to the Numpy broadcast rules. + +- **Step 2**: Then, the cond tensor will be one-way broadcasted to the + dst_shape of broadcasted \src\_0 and \src\_1. To be more specific, we align + the two shapes to the right and compare them from right to left. Each + dimension should be either equal or the dimension of cond should be 1. + +- **example**: + + - cond={4, 5}, dst_shape={2, 3, 4, 5} => dst = {2, 3, 4, 5} + - cond={3, 1, 5}, dst_shape={2, 3, 4, 5} => dst = {2, 3, 4, 5} + - cond={3,5}, dst_shape={2, 3, 4, 5} => dst = invalid_shape + +Operation Attributes +******************** + ++-------------------+-------------------+------------+------------+-------------+ +| Attribute | Description | Value Type | Supported | Required or | +| Name | | | Values | Optional | ++===================+===================+============+============+=============+ +| |attr_auto_bcast| | Specifies | string | ``none``, | Optional | +| | rules used | | ``numpy``, | | +| | for | | (default) | | +| | auto-broadcasting | | | | +| | of src | | | | +| | tensors | | | | ++-------------------+-------------------+------------+------------+-------------+ + + +Execution Arguments +******************* + +The inputs and outputs must be provided according to the below index order +when constructing an operation. + +Inputs +====== + + +===== ============= ==================== +Index Argument Name Required or Optional +===== ============= ==================== +0 ``cond`` Required +1 ``src_0`` Required +2 ``src_1`` Required +===== ============= ==================== + +@note All input shapes should match and no broadcasting is allowed if the +`auto_broadcast` attribute is set to `none`, or can be broadcasted according to +the broadcasting rules mentioned above if `auto_broadcast` attribute set to +`numpy`. + +Outputs +======= + + +===== ============= ==================== +Index Argument Name Required or Optional +===== ============= ==================== +0 ``dst`` Required +===== ============= ==================== + +Supported Data Types +******************** + +Select operation supports the following data type combinations. + +======= ===== ===== ==== +Cond Src_0 Src_1 Dst +======= ===== ===== ==== +boolean f32 f32 f32 +boolean bf16 bf16 bf16 +boolean f16 f16 f16 +======= ===== ===== ==== diff --git a/source/elements/oneDNN/source/graph/ops/index.rst b/source/elements/oneDNN/source/graph/ops/index.rst index b82181fc2..4f484e0c2 100644 --- a/source/elements/oneDNN/source/graph/ops/index.rst +++ b/source/elements/oneDNN/source/graph/ops/index.rst @@ -75,6 +75,7 @@ subset of the operation set. ReduceSum.rst Reorder.rst Round.rst + Select.rst Sigmoid.rst SigmoidBackward.rst SoftPlus.rst From 1469f610e1691253e17f9d70912eb3e659915fe7 Mon Sep 17 00:00:00 2001 From: "Zhang, Wuxun" Date: Thu, 29 Jun 2023 14:24:56 +0800 Subject: [PATCH 3/3] add Pow op in onednn graph --- .../elements/oneDNN/source/graph/ops/Pow.rst | 63 +++++++++++++++++++ .../oneDNN/source/graph/ops/index.rst | 1 + 2 files changed, 64 insertions(+) create mode 100644 source/elements/oneDNN/source/graph/ops/Pow.rst diff --git a/source/elements/oneDNN/source/graph/ops/Pow.rst b/source/elements/oneDNN/source/graph/ops/Pow.rst new file mode 100644 index 000000000..f61ac2845 --- /dev/null +++ b/source/elements/oneDNN/source/graph/ops/Pow.rst @@ -0,0 +1,63 @@ +.. SPDX-FileCopyrightText: 2023 Intel Corporation +.. +.. SPDX-License-Identifier: CC-BY-4.0 + +.. include:: ../../replacements.inc.rst + +Pow +### + +## General + +Pow operation performs an element-wise power operation on a given input tensor +with a single value attribute beta as its exponent. It is based on the following +mathematical formula: + +.. math:: + + \dst_i = \src_i ^ \beta + +## Operation attributes + ++--------------+----------------+------------+--------------+-------------+ +| Attribute | Description | Value Type | Supported | Required or | +| Name | | | Values | Optional | ++==============+================+============+==============+=============+ +| |attr_beta| | exponent, | f32 | Arbitrary | Required | +| | :math:`\beta` | | f32 value | | +| | in the | | | | +| | formula. | | | | ++--------------+----------------+------------+--------------+-------------+ + +Inputs +====== + + +===== ============= ==================== +Index Argument Name Required or Optional +===== ============= ==================== +0 ``src`` Required +===== ============= ==================== + +Outputs +======= + + +===== ============= ==================== +Index Argument Name Required or Optional +===== ============= ==================== +0 ``dst`` Required +===== ============= ==================== + +Supported Data Types +******************** + +Pow operation supports the following data type combinations. + +==== ==== +Src Dst +==== ==== +f32 f32 +bf16 bf16 +f16 f16 +==== ==== diff --git a/source/elements/oneDNN/source/graph/ops/index.rst b/source/elements/oneDNN/source/graph/ops/index.rst index 4f484e0c2..06d83dcfa 100644 --- a/source/elements/oneDNN/source/graph/ops/index.rst +++ b/source/elements/oneDNN/source/graph/ops/index.rst @@ -60,6 +60,7 @@ subset of the operation set. Mish.rst MishBackward.rst Multiply.rst + Pow.rst PReLU.rst PReLUBackward.rst Quantize.rst