Skip to content

Commit da0f39c

Browse files
author
Hariprasad Ravishankar
committed
Filter tests for TOSA and ONNX. Fix deprecation warnings
1 parent d53b83a commit da0f39c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

lib/Conversion/TorchToLinalg/Linear.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,8 +1594,8 @@ Value ConvertAtenConvolutionOp::createTransposedInputPadding(
15941594
// Make the negative value positive by multiplying by -1.
15951595
anyDimensionPaddingIsNegative = true;
15961596
auto offsetType = offset.getType();
1597-
auto negOneConst = rewriter.createOrFold<arith::ConstantOp>(
1598-
loc, offsetType, rewriter.getIntegerAttr(offsetType, -1));
1597+
auto negOneConst = arith::ConstantOp::create(
1598+
rewriter, loc, rewriter.getIntegerAttr(offsetType, -1));
15991599
auto posOffset =
16001600
rewriter.createOrFold<arith::MulIOp>(loc, offset, negOneConst);
16011601

@@ -1626,10 +1626,10 @@ Value ConvertAtenConvolutionOp::createTransposedInputPadding(
16261626
for (size_t i = 0; i < numSpatialDims; ++i) {
16271627
Value innerDim = innerSizes[i + 2];
16281628
Value outerDim = outerSizes[i + 2];
1629-
Value isPadding = rewriter.create<arith::CmpIOp>(
1629+
Value isPadding = rewriter.createOrFold<arith::CmpIOp>(
16301630
loc, arith::CmpIPredicate::ugt, outerDim, innerDim);
1631-
Value maxDim =
1632-
rewriter.create<arith::SelectOp>(loc, isPadding, outerDim, innerDim);
1631+
Value maxDim = rewriter.createOrFold<arith::SelectOp>(loc, isPadding,
1632+
outerDim, innerDim);
16331633
maxSizes.push_back(maxDim);
16341634
}
16351635

projects/pt1/e2e_testing/xfail_sets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3961,7 +3961,9 @@
39613961
"TraceModule_empty",
39623962
"TraceUnsignedIntModule_empty",
39633963
"TransposedConv1dNegativePadding_basic",
3964+
"TransposedConv1dNegativePaddingLarge_basic",
39643965
"TransposedConv2dNegativePadding_basic",
3966+
"TransposedConv2dPositiveAndNegativePadding_basic",
39653967
"TransposedConv3dNegativePadding_basic",
39663968
"UnsafeViewCollapseDynamicWithAtenSizeIntModule_basic",
39673969
"InterpolateDynamicModule_sizes_nearest",
@@ -5039,7 +5041,9 @@
50395041
"TraceUnsignedIntModule_basic",
50405042
"TraceUnsignedIntModule_empty",
50415043
"TransposedConv1dNegativePadding_basic",
5044+
"TransposedConv1dNegativePaddingLarge_basic",
50425045
"TransposedConv2dNegativePadding_basic",
5046+
"TransposedConv2dPositiveAndNegativePadding_basic",
50435047
"TransposedConv3dNegativePadding_basic",
50445048
"TupleModule_basic",
50455049
"TypeAsDifferentModule_basic",

projects/pt1/python/torch_mlir_e2e_test/test_suite/conv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ def TransposedConv1dNegativePadding_basic(module, tu: TestUtils):
20022002
module.forward(tu.rand(1, 1, 7), tu.rand(1, 2, 3), tu.rand(2))
20032003

20042004

2005-
class ConvTranspose1dNegativePaddingLarge(torch.nn.Module):
2005+
class TransposedConv1dNegativePaddingLarge(torch.nn.Module):
20062006
def __init__(self):
20072007
super().__init__()
20082008

@@ -2029,8 +2029,8 @@ def forward(self, inputVec, weight, bias):
20292029
)
20302030

20312031

2032-
@register_test_case(module_factory=lambda: ConvTranspose1dNegativePaddingLarge())
2033-
def ConvTranspose1dNegativePaddingLarge_basic(module, tu: TestUtils):
2032+
@register_test_case(module_factory=lambda: TransposedConv1dNegativePaddingLarge())
2033+
def TransposedConv1dNegativePaddingLarge_basic(module, tu: TestUtils):
20342034
module.forward(tu.rand(1, 17, 5), tu.rand(17, 6, 3), tu.rand(6))
20352035

20362036

0 commit comments

Comments
 (0)