Skip to content

Commit ae3044a

Browse files
kuharpstarkcdpr
authored andcommitted
[Codegen][ROCm] Don't branch on undef in getPaddingConvSize (iree-org#22449)
The fields in `ConvToIgemmInfo` were left uninitialized and some code paths would branch on them, which invoked Undefined Behavior in C++. Fixes: iree-org#22448
1 parent d7a010f commit ae3044a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/iree/compiler/Codegen/Dialect/GPU/TargetUtils/ConfigUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ static std::optional<GPUMMASchedule> getMmaScheduleFromProblemAndTarget(
369369
}
370370

371371
struct ConvToIgemmInfo {
372-
bool isBatchDimLast;
373-
bool isSpatialDimLast;
372+
bool isBatchDimLast = false;
373+
bool isSpatialDimLast = false;
374374
linalg::ConvolutionDimensions convDims;
375375
DenseMap<int64_t, AffineExpr> convToIgemmDimMap;
376376
DenseMap<int64_t, int64_t> inputChannelDimToSize;

0 commit comments

Comments
 (0)