[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs element-wise multiplication of each tensor in the input tensor list by the corresponding scalar in the scalar list.

  • Formula:

    x=[x0,x1,...xn1]scalars=[scalars0,scalars1,...scalarsn1]y=[y0,y1,...yn1]x = [{x_0}, {x_1}, ... {x_{n-1}}]\\ scalars = [{scalars_0}, {scalars_1}, ... {scalars_{n-1}}]\\ y = [{y_0}, {y_1}, ... {y_{n-1}}]\\ yi=xiscalarsi(i=0,1,...n1)y_i = x_i * scalars_i (i=0,1,...n-1)
[object Object]

Each operator has calls. First, aclnnForeachMulScalarListGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnForeachMulScalarList is called to perform computation.

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

    [object Object]
    • [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 of [object Object] must be FLOAT32 or INT64 and depends on that of [object Object]:

      • When [object Object] is of the FLOAT32, FLOAT16, or BFLOAT16 type, [object Object] must be FLOAT32.
      • When [object Object] is of the INT32 type, [object Object] must be INT64.
    • Ascend 950PR/Ascend 950DT:

      • Both [object Object] and [object Object] support a maximum of 50 tensors. The length of the tensor list out must be equal to that of x.
      • The length of the ScalarList of [object Object] must be the same as that of the TensorList of [object Object].
      • The data type of [object Object] can be FLOAT32, DOUBLE, or INT64, and depends on that of [object Object]:
        • When [object Object] is of type BFLOAT16, FLOAT32, or FLOAT16, the supported data type is FLOAT32 or DOUBLE.
        • When the data type of x is INT32, the data type of this parameter can be INT64.
  • Returns

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

    The first-phase API implements input parameter verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

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

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

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

[object Object]