[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs element-wise multiplication on tensor lists x2 and x3, multiplies the result by the scalar scalar, and then adds the result element-wise to tensor list x1. Compared with , this API modifies the structure type of the input parameter scalar from aclTensor to aclScalar. Select the appropriate API based on actual requirements.
  • Formula:x1=[x10,x11,...x1n1],x2=[x20,x21,...x2n1],x3=[x30,x31,...x3n1]y=[y0,y1,...yn1]x1 = [{x1_0}, {x1_1}, ... {x1_{n-1}}], x2 = [{x2_0}, {x2_1}, ... {x2_{n-1}}], x3 = [{x3_0}, {x3_1}, ... {x3_{n-1}}]\\ y = [{y_0}, {y_1}, ... {y_{n-1}}]\\ yi=x1i+scalar×x2i×x3i(i=0,1,...n1){\rm y}_i = x1_{i} + {\rm scalar} × x2_{i} × x3_{i} (i=0,1,...n-1)
[object Object]

Each operator has calls. First, aclnnForeachAddcmulScalarV2GetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnForeachAddcmulScalarV2 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] depends on that of [object Object]:

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

      • The data type of [object Object] has a mapping relationship with that of the input parameter [object Object].
        • When the data type of [object Object] is BFLOAT16 or FLOAT32, the supported data types are FLOAT32 and DOUBLE.
        • When the data type of [object Object] is FLOAT16, the supported data types are FLOAT16, FLOAT32, and DOUBLE.
        • When [object Object] is of the INT32 type, the data type must be INT32 or INT64.
      • The maximum number of tensors supported by the input parameters [object Object], [object Object] and [object Object] and the output parameter [object Object] is 50.
  • Return Value

    [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]
  • Return Value

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

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

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

[object Object]