文件最后提交记录最后更新时间
3 个月前
6 个月前
6 个月前
18 天前
18 天前
18 天前
6 个月前
3 个月前
README.md

DequantBias

产品支持情况

产品 是否支持
Ascend 950PR/Ascend 950DT ×
Atlas A3 训练系列产品/Atlas A3 推理系列产品
Atlas A2 训练系列产品/Atlas A2 推理系列产品
Atlas 200I/500 A2 推理产品 ×
Atlas 推理系列产品 ×
Atlas 训练系列产品 ×
Kirin X90 处理器系列产品
Kirin 9030 处理器系列产品

功能说明

  • 算子功能:对输入x反量化操作,将输入的int32的数据转化为FLOAT16/BFLOAT16输出。

  • 计算公式:

    y=A×weight_scale×activate_scaley = A \times \text{weight\_scale} \times \text{activate\_scale}

    y=(A+bias)×weight_scale×activate_scale y = (A + \text{bias}) \times \text{weight\_scale} \times \text{activate\_scale}

    y=A×weight_scale×activate_scale+bias y = A \times \text{weight\_scale} \times \text{activate\_scale} + \text{bias}

参数说明

参数名 输入/输出/属性 描述 数据类型 数据格式
x 输入 公式中的输入A。 INT32 ND
weightScale 输入 公式中的输入weight_scale。 BFLOAT16、FLOAT ND
activateScaleOptional 输入 公式中的输入activate_scale。 FLOAT -
biasOptional 输入 公式中的输入bias。 BFLOAT16、FLOAT16、FLOAT、INT32 -
outputDtype 属性
  • 输出out的数据类型。
  • 值为[1,27]。
INT -
out 输出 公式中的输出y。 BFLOAT16、FLOAT16 ND
  • Kirin X90/Kirin 9030 处理器系列产品: 不支持BFLOAT16。

约束说明

输入和输出参数中shape的N和M必须是正整数,且M的取值小于等于25000。

调用说明

调用方式 调用样例 说明
aclnn调用 test_aclnn_dequant_bias 通过aclnnDequantBias接口方式调用DequantBias算子。
图模式调用 - 通过算子IR构图方式调用DequantBias算子。