Fix copy-paste typos in DynamicQuantizeLSTM zero-point and scale validation

Merged
CH
4mo ago
+2-2

Description

Two copy-paste typos in  DynamicQuantizeLSTM::Compute  ( dynamic_quantize_lstm.cc ) cause the recurrence-weight zero-point and scale to be validated against the wrong tensor's shape:

  1. L181:  R_zp_shape = w_zp->Shape()  →  r_zp->Shape() .  ZeroPointCheck  then iterates  w_zp 's element count over the smaller  r_zp  tensor, reading past it (OOB read).
  2. L188:  WeightCheck(W_scale_shape, R_scale)  →  WeightCheck(R_scale_shape, R_scale) . The recurrence scale shape is validated against the input scale shape instead of its own.

Motivation and Context