Default initialize offsets to avoid UB

If col/row is padded, uninitialized orig_r/orig_c can be used base_idx calculation

PiperOrigin-RevId: 348511995
Change-Id: I68045a00129c97247af20e6d169577b0e772e58b
This commit is contained in:
Eugene Zhulenev 2020-12-21 12:43:25 -08:00 committed by TensorFlower Gardener
parent 7790cd6c2f
commit 428aef7972

View File

@ -364,8 +364,8 @@ struct gemm_pack_colmajor_block<
// Original input column and row after applying all non-standard strides and
// dilations. Computed by padOrSkip{Row,Col}.
Index orig_c;
Index orig_r;
Index orig_c = 0;
Index orig_r = 0;
for (StorageIndex col = 0; col < cols; ++col) {
SubMapper lm = rhs.getLinearMapper(0, col);