Formula:
If [object Object] is not input:
If [object Object] is input:
Note: [object Object] and [object Object] support broadcasting with X. The shape rules of [object Object] and [object Object] are as follows:
When scaleFromBlob is True (axis is converted to a positive number, and numAxes is -1, indicating the last axis):
scaleShape is xShape[axis:axis + numAxes].
biasShape is xShape[axis:axis + numAxes].
When scaleFromBlob is False (axis is converted to a positive number, and numAxes is -1, indicating the first axis):
scaleShape is xShape[axis:axis + rank(scaleShape)].
biasShape is xShape[axis:axis + rank(scaleShape)].
Example:
scaleFromBlob = True:
xShape = [a, b, c, d, e, f] axis = 3 numAxes = 2 --> scaleShape = [d, e]
xShape = [a, b, c, d, e, f] axis = 3 numAxes = 3 --> scaleShape = [d, e, f]
xShape = [a, b, c, d, e, f] axis = 3 numAxes = -1 --> scaleShape = [d, e, f]
scaleFromBlob = False:
xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 2 --> scaleShape = [d, e]
xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 3 --> scaleShape = [d, e, f]
xShape = [a, b, c, d, e, f] axis = 3 rank(scaleShape) = 1 --> scaleShape = [d]
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](aclTensor*, compute input): tensor of the operator input, aclTensor on the device. are supported. The supports ND.- [object Object]Atlas inference products[object Object]: The data type can be FLOAT or FLOAT16.
- [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 FLOAT, FLOAT16, or BFLOAT16.
[object Object](aclTensor*, compute input): tensor of the operator input, aclTensor on the device. The data type must be the same as that of[object Object]. are supported. The supports ND. The shape meets the broadcast requirements. For details, see [Function](#Function Description).- [object Object]Atlas inference products[object Object]: The data type can be FLOAT or FLOAT16.
- [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 FLOAT, FLOAT16, or BFLOAT16.
[object Object](aclTensor*, compute input): tensor of the operator input, aclTensor on the device. If[object Object]is not empty, the data type must be the same as that of[object Object]. are supported. The supports ND. The shape must be the same as that of[object Object].- [object Object]Atlas inference products[object Object]: The data type can be FLOAT or FLOAT16.
- [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 FLOAT, FLOAT16, or BFLOAT16.
[object Object](int64_t, compute input): INT64 type on the host, specifying the start axis for scaling. The value range is [–x_rank, x_rank), where x_rank indicates the shape of[object Object].[object Object](int64_t, compute input): INT64 type on the host, specifying the number of axes for scaling. The value range is >= -1, and numAxes = -1 indicates that scaling starts from the axis to the last axis.[object Object](bool, compute input): BOOL type on the host, specifying whether to scale from blob. True: scale from blob, and numAxes + axis is used for scaling. False: scale from input scale, and scale the input scale length from[object Object]and ignore the value of[object Object].[object Object](aclTensor*, compute output): output tensor, aclTensor on the device. The shape and data type must be the same those of[object Object]. are supported. The supports ND.- [object Object]Atlas inference products[object Object]: The data type can be FLOAT or FLOAT16.
- [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 FLOAT, FLOAT16, or BFLOAT16.
[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): size 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 calling[object Object].[object Object](aclOpExecutor *, input): operator executor, containing the operator computation process.[object Object](aclrtStream, input): stream for executing the task.
Returns:
- Deterministic compute:
[object Object]defaults to a deterministic implementation.
[object Object]Atlas inference products[object Object]: The input of [object Object] and [object Object] cannot be bf16.
The following example is for reference only. For details, see .