When PTQ is used for quantization, an error message is displayed when an empty tensor is input during quantization.

Symptom

During PTQ, an error message is displayed when an empty tensor is input. The detailed error message is as follows:

1
2
3
4
5
6
7
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
[ERROR][QuantIfmrInternelGpu][114] Empty pointer, all input tensor is empty
2022-07-02 22:11:36.232362: I tensorflow/core/kernels/logging_ops.cc:166 Do layer multilevel_roi_align/roi_level5/roi_align/AvgPool activation calibration with ifmr success!

Possible Cause

The input data is not a real dataset.

Solution

Use a real dataset for post-training quantization.