FilesLast commitLast update
13 days ago
3 months ago
2 months ago
21 days ago
21 days ago
5 days ago
5 days ago
1 month ago
7 days ago
5 days ago
12 days ago
6 days ago
README

StridedSlice

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 √
Kirin X90 processor series products √
Kirin 9030 processor series products √

Function Description

  • Operator function: extracts a sub-tensor from the input tensor according to the specified start and end positions and the specified step.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input tensor INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, COMPLEX32, COMPLEX64, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN ND
begin Input Start value of each dimension INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, COMPLEX32, COMPLEX64, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN ND
end Input End value of each dimension INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, COMPLEX32, COMPLEX64, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN ND
strides Input Interval at which values are taken at each point in each dimension INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, COMPLEX32, COMPLEX64, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN ND
begin_mask Attribute This value specifies the dimensions whose begin values are ignored INT32, INT64 ND
end_mask Attribute This value specifies the dimensions whose end values are ignored INT32, INT64 ND
ellipsis_mask Attribute All dimensions starting from the specified dimension are selected until the user-specified begin is encountered INT32, INT64 ND
new_axis_mask Attribute Adds a shape with dimension 1 at the specified bit INT32, INT64 ND
shrink_axis_mask Attribute Forces the dimension at the corresponding index to be reduced to 1 INT32, INT64 ND
y Output Output tensor INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, COMPLEX32, COMPLEX64, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN ND

Constraint Description

For Kirin X90/Kirin 9030 products, x/y supports only the INT8, UINT8, INT16, UINT16, INT32, FLOAT16, and FLOAT32 data types; begin/end/strides supports only the INT32 data type

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_strided_slice Invokes the StridedSlice operator through the aclnnStridedSlice API.
Graph-mode invocation test_strided_slice Invokes the StridedSlice operator by building a graph through the operator IR