[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Generates an evenly spaced value sequence. It creates a one-dimensional vector whose size is [object Object]. The values are evenly distributed linearly from [object Object] to [object Object] (included).

  • Formula:

out=(start,start+endstartsteps1,...,start+(steps2)endstartsteps1,end)out = (start, start + \frac{end - start}{steps - 1},...,start + (steps - 2) * \frac{end - start}{steps -1}, end) [object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

  • [object Object]
  • [object Object]
[object Object]
  • Parameters

    • [object Object] (aclScalar*, computation input): start position of the value range to be obtained, input [object Object] in the formula, [object Object] on the host.

      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: The data type can be FLOAT16, BFLOAT16, FLOAT, DOUBLE, UINT8, INT8, INT16, INT32, or BOOL.
      • [object Object]Atlas inference products[object Object], [object Object]Atlas training products[object Object]: The data type can be FLOAT16, FLOAT, DOUBLE, UINT8, INT8, or INT32.
    • [object Object] (aclScalar*, computation input): end position of the value range to be obtained, input [object Object] in the formula, [object Object] on the host.

      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: The data type can be FLOAT16, BFLOAT16, FLOAT, DOUBLE, UINT8, INT8, INT16, INT32, or BOOL.
      • [object Object]Atlas inference products[object Object], [object Object]Atlas training products[object Object]: The data type can be FLOAT16, FLOAT, DOUBLE, UINT8, INT8, or INT32.
    • steps (int64_t, computation input): number of generated elements. The data type can be INT64. The value of steps must be greater than or equal to 0.

    • [object Object] (aclTensor *, computation output): specified output tensor, containing values that are linearly and evenly distributed from [object Object] to [object Object] (inclusive). In the formula, [object Object] is the [object Object] on the device side. supports ND, and the number of elements in [object Object] must be the same as that in [object Object]. Empty tensors are not supported.

      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object], [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: The data type can be FLOAT16, BFLOAT16, FLOAT, DOUBLE, UINT8, INT8, INT16, or INT32.
      • [object Object]Atlas inference products[object Object], [object Object]Atlas training products[object Object]: The data type can be FLOAT16, FLOAT, DOUBLE, UINT8, INT8, or INT32.
    • [object Object] (uint64_t*, output): size of the workspace to be allocated on the device.

    • [object Object] (aclOpExecutor**, output): operator executor, containing the operator computation process.

  • Returns

    [object Object]: status code. For details, see .

[object Object]
[object Object]
  • Parameters

    • [object Object] (void*, input): address of the workspace to be allocated on the device.

    • [object Object] (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by the first-phase API [object Object].

    • [object Object] (aclOpExecutor*, input): operator executor, containing the operator computation process.

    • [object Object] (aclrtStream, input): stream for executing the task.

  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computation:
    • [object Object] defaults to deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]