Compare Per Layer Report

This page summarizes per-layer compare results produced by compare_per_layer.

Total compared layers: 27

Metric trends by layer

Per-layer details

mod_name base_op_type analy_op_type shape dtype qscale L1 COSINE ATOL max_qscale_diff base_model_min analy_model_min base_model_max analy_model_max base_model_mean analy_model_mean same_in_qatbc_qdiff same_in_intbc_qdiff advice
quant horizon_plugin_pytorch.quantization.stubs.QuantStub horizon_plugin_pytorch.nn.qat.stubs.QuantStub 4*3*12*12 qint8 0.00784 0.001951 0.999992 0.003931 0.501371 -0.997782 -0.99568 0.99961 0.99568 0.010543 0.010471 None None None
conv torch.nn.modules.conv.Conv2d horizon_plugin_pytorch.nn.qat.conv2d.Conv2d None qint8 0.009784 None None None None -1.283025 -1.25229 0.809703 0.812032 0.049286 0.049308 None None Clamp error is detected. Set fixed scale 0.01010255738506167 or adjust calibration stragety.
bn torch.nn.modules.batchnorm.BatchNorm2d horizon_plugin_pytorch.nn.linear.Identity 4*3*12*12 qint8 0.009784 0.00273 0.999977 0.030728 3.140841 -1.283018 -1.25229 0.809699 0.812032 0.049286 0.049308 None None Clamp error is detected. Set fixed scale 0.010102505758991392 or adjust calibration stragety.
quant_grid horizon_plugin_pytorch.quantization.stubs.QuantStub horizon_plugin_pytorch.nn.qat.stubs.QuantStub 4*8*8*2 qint16 3.4e-05 8e-06 1.0 1.7e-05 0.50071 -0.999971 -0.999963 0.995216 0.99523 0.026371 0.026371 None None None
torch.add torch.add 4*8*8*2 qint16 6.1e-05 4.1e-05 1.0 0.007578 124.628193 -1.999941 -1.992364 1.990433 1.990479 0.052742 0.052761 None None Clamp error is detected. Set fixed scale 6.103522901179666e-05 or adjust calibration stragety.
horizon_plugin_pytorch.nn.grid_sample.autocasted_grid_sample horizon_plugin_pytorch.nn.grid_sample.autocasted_grid_sample 4*3*8*8 qint8 0.009784 0.000947 0.999951 0.016987 1.736254 -0.878324 -0.880516 0.728032 0.72398 0.015337 0.015376 None None None
grid_sample horizon_plugin_pytorch.nn.grid_sample.warp horizon_plugin_pytorch.nn.grid_sample.warp 4*3*8*8 qint8 0.009784 0.002824 0.999958 0.023351 2.386723 -0.952971 -0.949001 0.773048 0.772898 0.053811 0.053899 None None None
add1 horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.add horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.add 4*3*12*12 qint8 0.019567 0.005461 0.999977 0.061457 3.140841 -2.566036 -2.50458 1.619397 1.624063 0.098572 0.098616 None None Clamp error is detected. Set fixed scale 0.020205011517982784 or adjust calibration stragety.
torch.Tensor.topk torch.Tensor.topk 4*3*12*5 qint8 0.019567 0.005416 0.999976 0.018 0.919937 -0.927186 -0.91965 1.619397 1.624063 0.607509 0.606034 None None None
torch.sigmoid torch.sigmoid 4*3*12*5 qint8 0.006589 0.002034 0.999993 0.007164 1.087359 0.283496 0.283308 0.834712 0.836746 0.634057 0.633754 None None None
torch.Tensor.__getitem__ torch.Tensor.__getitem__ 4*3*2*2 qint8 0.009784 0.000552 0.999968 0.005258 0.537388 -0.223396 -0.225021 0.679588 0.684846 0.0185 0.018752 None None None
torch.Tensor.__getitem__ torch.Tensor.__getitem__ 4*3*2*2 qint8 0.009784 0.00227 0.999945 0.007198 0.735719 -0.605216 -0.606578 0.683749 0.684846 0.06055 0.060535 None None None
mm horizon_plugin_pytorch.nn.matmul.Matmul horizon_plugin_pytorch.nn.qat.matmul.Matmul 4*3*2*2 qint8 0.002537 0.003802 0.986058 0.142438 56.13886 -0.060979 -0.060894 0.464668 0.32223 0.032521 0.029073 None None Clamp error is detected. Set fixed scale 0.0036588038985184796 or adjust calibration stragety.
ln.input_mean.mean horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.mean horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.mean 4*3*2*1 qint16 7e-06 0.007932 0.963225 0.182184 26952.690919 0.0 0.0 0.403668 0.221485 0.032521 0.024875 None None Clamp error is detected. Set fixed scale 1.2319350725025458e-05 or adjust calibration stragety.
ln.sub horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.sub horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.sub 4*3*2*2 qint16 4e-06 0.004449 0.696142 0.161746 38318.022294 -0.098091 -0.098948 0.098091 0.100746 -0.0 0.004198 None None None
ln.mul horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.mul horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.mul 4*3*2*2 qint16 1e-06 0.000282 0.913049 0.006429 10825.255071 0.0 0.0 0.009622 0.01015 0.000788 0.001067 None None None
ln.var_mean.mean horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.mean horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.mean 4*3*2*1 qint16 1e-06 0.000282 0.913051 0.006429 10825.255071 0.0 0.0 0.009622 0.01015 0.000788 0.001067 None None None
ln.rsqrt horizon_plugin_pytorch.nn.rsqrt.Rsqrt horizon_plugin_pytorch.nn.rsqrt.Rsqrt 4*3*2*1 qint16 0.009381 7.370845 0.999893 14.263481 1520.422634 10.189329 9.925374 316.227753 307.236298 222.45079 215.812012 None None Clamp error is detected. Set fixed scale 0.00965079966690716 or adjust calibration stragety.
ln.out_mul horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.mul horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.mul 4*3*2*2 qint16 3.1e-05 0.04332 0.881277 1.998372 65499.463272 -0.999481 -0.999743 0.999481 0.999713 -0.0 0.041678 None None None
ln.weight_quant horizon_plugin_pytorch.quantization.stubs.QuantStub horizon_plugin_pytorch.nn.qat.stubs.QuantStub 2 qint16 3.1e-05 1.5e-05 1.0 1.5e-05 0.499992 1.0 0.999985 1.0 0.999985 1.0 0.999985 None None Do symmetric normalization about 0.
ln.weight_mul horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.mul horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.mul 4*3*2*2 qint16 3.1e-05 0.043317 0.881279 1.998341 65498.463015 -0.999481 -0.999743 0.999481 0.999682 -0.0 0.041676 None None None
ln.bias_quant horizon_plugin_pytorch.quantization.stubs.QuantStub horizon_plugin_pytorch.nn.qat.stubs.QuantStub 2 qint16 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 None None Do symmetric normalization about 0.
ln.bias_add horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.add horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.add 4*3*2*2 qint8 0.007841 0.043785 0.881708 1.994467 254.363667 -0.999481 -1.003649 0.999481 0.995808 -0.0 0.041329 None None None
torch.Tensor.add torch.Tensor.add 4*3*2*2 qint8 0.010369 0.046804 0.896802 1.972829 190.265777 -1.06046 -1.067987 1.463327 1.316839 0.032521 0.070638 None None Clamp error is detected. Set fixed scale 0.011522260237866499 or adjust calibration stragety.
add2 horizon_plugin_pytorch.nn.quantized.functional_modules.FloatFunctional.add horizon_plugin_pytorch.nn.qat.functional_modules.FloatFunctional.add 4*3*12*5 qint8 0.013177 0.004067 0.999993 0.014328 1.087359 0.566992 0.566615 1.669424 1.673492 1.268115 1.267509 None None None
dequant torch.ao.quantization.stubs.DeQuantStub horizon_plugin_pytorch.nn.qat.stubs.DeQuantStub 4*3*2*2 torch.float32 None 0.046804 0.896802 1.972829 None -1.06046 -1.067987 1.463327 1.316839 0.032521 0.070638 None None Set high precision output if it comes from gemm ops.
dequant(1) torch.ao.quantization.stubs.DeQuantStub horizon_plugin_pytorch.nn.qat.stubs.DeQuantStub 4*3*12*5 torch.float32 None 0.004067 0.999993 0.014328 None 0.566992 0.566615 1.669424 1.673492 1.268115 1.267509 None None Set high precision output if it comes from gemm ops.