FilesLast commitLast update
5 days ago
2 months ago
3 months ago
18 days ago
9 months ago
3 days ago
1 month ago
1 month ago
5 days ago
2 months ago
9 days ago
9 days ago
README

LinSpace

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: generates a sequence of evenly spaced values. Creates a one-dimensional vector of size num, whose values are linearly and uniformly distributed from start to stop (inclusive).

  • Computation formula:

output=(start,start+stop−startnum−1,...,start+(num−2)∗stop−startnum−1,stop)output = (start, start + \frac{stop - start}{num - 1},...,start + (num - 2) * \frac{stop - start}{num -1}, stop)

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
start Input Input tensor start in the formula, which must be a one-dimensional tensor. INT8, UINT8, INT16, INT32, FLOAT, FLOAT16, BFLOAT16 ND
stop Input Input tensor stop in the formula, which must be a one-dimensional tensor. INT8, UINT8, INT16, INT32, FLOAT, FLOAT16, BFLOAT16 ND
num Input Input tensor num in the formula, which must be a one-dimensional tensor. INT32, INT64 ND
output Output Output tensor output in the formula. INT8, UINT8, INT16, INT32, FLOAT, FLOAT16, BFLOAT16 ND
  • Kirin X90/Kirin 9030 processor series products, Atlas training products, and Atlas inference products: BFLOAT16 and INT16 are not supported.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_lin_space Invokes the LinSpace operator through the aclnnLinspace API.
Graph-mode invocation test_geir_lin_space Invokes the LinSpace operator by building a graph through the operator IR.