Description: Performs element-wise multiplication between each tensor in the input tensor list and the given tensor scalar.
Formula:
Each operator has calls. First, aclnnForeachMulScalarGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnForeachMulScalar is called to perform computation.
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, FLOAT16, or INT32 type, the data type must be the same as that of[object Object]. - When
[object Object]is of the BFLOAT16 type, the data type must be FLOAT32.
- When
Ascend 950PR/Ascend 950DT: The data type depends on that of the input parameter
[object Object]:- Both
[object Object]and[object Object]support a maximum of 50 tensors. - The data type of
[object Object]depends on that of[object Object]:- When x is of the FLOAT32 or INT32 type, the data type must be the same as that of x.
- When
[object Object]is of the BFLOAT16 type, the data type must be FLOAT32. - When x is of the FLOAT16 type, the data type must be FLOAT16 or FLOAT32.
- Both
Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Deterministic computation:
- aclnnForeachMulScalar defaults to a deterministic implementation.
The following example is for reference only. For details, see .