Description: After the scalar
[object Object]is broadcast into a tensor with the same shape as the tensor[object Object], converts each element in the tensor to the remainder obtained by dividing the corresponding element of the tensor[object Object]. The sign of the result is the same as that of the divisor[object Object], and the absolute value of the result is less than that of[object Object]. The actual computation of[object Object]is equivalent to the following formula:Example:
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]
Parameters:
[object Object](aclScalar*, computation input): input[object Object]in the formula, which is an aclScalar 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 INT32, INT64, FLOAT16, FLOAT, DOUBLE, or BFLOAT16. The data type and the data type of
[object Object]must meet the data type deduction rules (see ), and the deduced data type must be convertible to the data type of[object Object]. - [object Object]Atlas training products[object Object]: The data type can be INT32, INT64, FLOAT16, FLOAT, or DOUBLE. The data type and the data type of
[object Object]must meet the data type deduction rules (see ), and the deduced data type must be convertible to the data type of[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 can be INT32, INT64, FLOAT16, FLOAT, DOUBLE, or BFLOAT16. The data type and the data type of
[object Object](aclTensor*, computation input):[object Object]in the formula, aclTensor on the device. It supports . Its can be ND, and the data dimensions cannot exceed 8.- [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 INT32, INT64, FLOAT16, FLOAT, DOUBLE, or BFLOAT16. Its data type and the data type of
[object Object]must meet the type deduction rules (see ). The deduced data type must be convertible to that of[object Object]. - [object Object]Atlas training products[object Object]: The data type can be INT32, INT64, FLOAT16, FLOAT, or DOUBLE. Its data type and the data type of
[object Object]must meet the type deduction rules (see ). The deduced data type must be convertible to that of[object Object].
out(aclTensor *, compute output): output
[object Object]in the formula, aclTensor on the device. The shape must be the same as that of[object Object]. are supported. The can be ND.- [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 INT32, INT64, FLOAT16, FLOAT, DOUBLE, or BFLOAT16.
- [object Object]Atlas training products[object Object]: The data type can be INT32, INT64, FLOAT16, FLOAT, or DOUBLE.
[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
Parameters:
[object Object](void *, input): address of the workspace to be allocated on the device.[object Object](uint64_t, input): workspace size 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
Deterministic computation:
[object Object]defaults to deterministic implementation.
When the data type of
[object Object]is INT32, the functionality and precision within the range of [–2^24, 2^24] are preferentially ensured.When
[object Object]is 0 and the data type of[object Object]is an integer, the result of[object Object]is[object Object].
The following example is for reference only. For details, see .