-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: graph: add document for GenIndex and GreaterEqual
- Loading branch information
Showing
2 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
GenIndex{#dev_guide_op_genindex} | ||
================================ | ||
|
||
## General | ||
|
||
The GenIndex operation creates an index tensor along a specified axis of | ||
an input tensor. The resulting index tensor has the same shape as the | ||
input tensor, with each element representing the index along the | ||
specified axis. | ||
|
||
## Operation attributes | ||
|
||
| Attribute Name | Description | Value Type | Supported Values | Required or Optional | | ||
|:-------------------------------------------------------------|:-----------------------------------------------------------|:-----------|:-------------------------|:---------------------| | ||
| [axis] (@ref dnnl::graph::op::attr::axis) | Specifies the dimension along which index values are generated. | s64 | An s64 value in the range of [-r, r-1] where r = rank(src) | Required | | ||
|
||
## Execution Arguments | ||
|
||
### Input | ||
|
||
| Index | Argument Name | Required or Optional | | ||
|:------|:--------------|:---------------------| | ||
| 0 | `src` | Required | | ||
|
||
### Output | ||
|
||
| Index | Argument Name | Required or Optional | | ||
|:------| --------------|:---------------------| | ||
| 0 | `dst` | Required | | ||
|
||
## Supported Data Types | ||
|
||
The GenIndex operation supports the following data type combinations. | ||
|
||
| Src | Dst | | ||
|:-------|:-------| | ||
| f32 | s32 | | ||
| bf16 | s32 | | ||
| f16 | s32 | |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
GreaterEqual{#dev_guide_op_greaterequal} | ||
======================================== | ||
|
||
## General | ||
|
||
The GreaterEqual operation performs an element-wise greater-than-or-equal | ||
comparison between two given tensors. This operation applies | ||
the multi-directional broadcast rules to ensure compatibility between | ||
the tensors of different shapes. | ||
|
||
\f[ dst = \begin{cases} true & \text{if}\ src_0 \ge src_1 \\ | ||
false & \text{if}\ src_0 < src_1 \end{cases} \f] | ||
|
||
## Operation Attributes | ||
|
||
| Attribute Name | Description | Value Type | Supported Values | Required or Optional | | ||
|:-------------------------------------------------------------|:-----------------------------------------------------------|:-----------|:-------------------------|:---------------------| | ||
| [auto_broadcast](@ref dnnl::graph::op::attr::auto_broadcast) | Specifies rules used for auto-broadcasting of src tensors. | string | `none`,`numpy` (default) | Optional | | ||
|
||
## Execution Arguments | ||
|
||
### Input | ||
|
||
| Index | Argument Name | Required or Optional | | ||
|:------|:--------------|:---------------------| | ||
| 0 | `src_0` | Required | | ||
| 1 | `src_1` | Required | | ||
|
||
@note Both src shapes should match and no auto-broadcasting is allowed if | ||
the `auto_broadcast` attribute is `none`. `src_0` and `src_1` shapes can be | ||
different and auto-broadcasting is allowed if the `auto_broadcast` attribute | ||
is `numpy`. Broadcasting is performed according to `auto_broadcast` value. | ||
|
||
### Output | ||
|
||
| Index | Argument Name | Required or Optional | | ||
|:------| --------------|:---------------------| | ||
| 0 | `dst` | Required | | ||
|
||
## Supported Data Types | ||
|
||
The GreaterEqual operation supports the following data type combinations. | ||
|
||
| Src_0 / Src_1 | Dst | | ||
|:--------------|:---------| | ||
| f32 | boolean | | ||
| bf16 | boolean | | ||
| f16 | boolean | | ||
| s32 | boolean | |