Skip to content

Commit

Permalink
DecomposeComplexOps: Use static shape if available (#2289)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgehre-amd authored Jul 12, 2023
1 parent bbd3094 commit c23a61f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2825,7 +2825,7 @@ class DecomposeAtenNativeBatchNormOp
loc, ListType::get(IntType::get(context)), runningStatsShape);

SmallVector<int64_t> runningStatsShapeInt(inputRank, 1);
runningStatsShapeInt[1] = kUnknownSize;
runningStatsShapeInt[1] = runningMean.getType().cast<BaseTensorType>().getSizes()[0];
Type dtype = input.getType().cast<ValueTensorType>().getOptionalDtype();
Type reshapeType = ValueTensorType::get(
context, llvm::ArrayRef(runningStatsShapeInt), dtype);
Expand Down

0 comments on commit c23a61f

Please sign in to comment.