Skip to content

Commit

Permalink
[SPEC][Op] Align SearchSorted specification with core (#27275)
Browse files Browse the repository at this point in the history
### Details:
 - *Align SearchSorted tensor/attribute names with ones used in core*
 - *Minor improvements for descriptions*
 - *Fix SliceScatter missing opset number*

### Tickets:
 - *ticket-id*
  • Loading branch information
mmikolajcz authored Oct 29, 2024
1 parent e07546d commit 744475b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Operation Specifications
Sin-1 <operation-specs/arithmetic/sin-1>
Sinh-1 <operation-specs/arithmetic/sinh-1>
Slice-8 <operation-specs/movement/slice-8>
SliceScatter <operation-specs/movement/slice-scatter-15>
SliceScatter-15 <operation-specs/movement/slice-scatter-15>
SoftMax-1 <operation-specs/activation/softmax-1>
SoftMax-8 <operation-specs/activation/softmax-8>
SoftPlus-4 <operation-specs/activation/softplus-4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,40 @@ SearchSorted

**Attributes**

* *right*
* *right_mode*

* **Description**: If False, set the first suitable index. If True, return the last suitable index for given value. Default is False.
* **Range of values**: true or false
* **Type**: boolean
* **Description**: flag to control whether output would contain leftmost or rightmost indices for given values.
* **Range of values**:

* *true* - return the rightmost (last) suitable index for given value.
* *false* - return the leftmost (first) suitable index for given value.
* **Type**: ``boolean``
* **Default value**: false
* **Required**: *no*

**Inputs**:

* **1**: ``sorted`` - ND input tensor of type *T* - cannot be a scalar, containing monotonically increasing sequence on the innermost dimension. **Required.**
* **1**: ``sorted_sequence`` - ND input tensor of type *T* - cannot be a scalar, containing monotonically increasing sequence on the innermost dimension. **Required.**

* **2**: ``values`` - ND input tensor of type *T*, containing the search values. If sorted sequence is 1D, then the values can have any shape, otherwise the rank should be equal to the rank of sorted input. **Required.**

**Outputs**:

* **1**: Tensor of type *TOut*, with the same shape as second input tensor, containing the indices.
* **1**: Tensor of type *T_IND*, with the same shape as second input tensor ``values``, containing the indices.

**Types**

* *T*: any supported floating-point and integer type.

* *TOut*: int64.
* *T_IND*: ``int64``.

**Example**

.. code-block:: xml
:force:
<layer ... type="SearchSorted" ... >
<data right="True"/>
<data right_mode="true"/>
<input>
<port id="0">
<dim>7</dim>
Expand All @@ -63,7 +66,7 @@ SearchSorted
</port>
</input>
<output>
<port id="0" precision="I64">
<port id="2" precision="I64">
<dim>7</dim>
<dim>256</dim>
<dim>200</dim>
Expand Down

0 comments on commit 744475b

Please sign in to comment.