Skip to content

Commit

Permalink
DecomposeComplexOps: Use static shape if available
Browse files Browse the repository at this point in the history
  • Loading branch information
mgehre-amd committed Jul 21, 2023
1 parent 2174481 commit d91b608
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1267,16 +1267,6 @@
}) - {
### Test failing in make_fx_tosa but not in tosa

# 'tosa.const' op failed to verify that all of {value, output} have same shape
"BatchNorm1DModule_basic",
"BatchNorm1DWith2DInputModule_basic",
"BatchNorm2DModule_basic",
"BatchNorm3DModule_basic",

# 'tensor.empty' op incorrect number of dynamic sizes, has 1, expected 0
"BatchNorm1DStaticShapeModule_basic",
"ResNet18StaticModule_basic",

# Dynamic shape, has extra unsupported broadcast ops
"Matmul_3d",

Expand Down
2 changes: 1 addition & 1 deletion lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2768,7 +2768,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 d91b608

Please sign in to comment.