SliceWrite
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference products | √ |
| Atlas training products | √ |
Function Description
- Operator function: writes the value tensor to the specified position of the x tensor (with the offset specified by begin). This is an in-place operation, and the output shares the same memory as the input x.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Target tensor, which will be modified in place. | FLOAT16, FLOAT, DOUBLE, INT32, INT64 | ND |
| begin | Input | Start offset of the write operation. This parameter is a 1D tensor with a maximum of two elements (row_offset, col_offset). | INT32, INT64 | ND |
| value | Input | Tensor to be written. Its dimension must be the same as that of x. | FLOAT16, FLOAT, DOUBLE, INT32, INT64 | ND |
| x | Output | Output result, which shares the same memory as the input x (in-place operation). | FLOAT16, FLOAT, DOUBLE, INT32, INT64 | ND |
Constraint Description
- The dimension of x must be <= 2
- The dimension of value must be the same as the dimension of x
- begin must be a 1D tensor with two or fewer elements
- The value shape plus the begin offset must be within the x shape
- The input x and the output x must be the same memory
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| Graph-mode API | test_geir_slice_write | Invokes the SliceWrite operator through the operator IR API. |