r2.11 cherry-pick: 7b174a0f2e4 "Fix asan issue with QuantizeAndDequantizeV2/V3/V4/V4Grad shape inference functions."
Refer to the original commit: https://github.com/tensorflow/tensorflow/commit/7b174a0f2e40ff3f3aa957aecddfd5aaae35eccb