Skip to content

Commit abd61b4

Browse files
Anup Gangwarramiro050
authored andcommitted
* Workaround for Issue 521, remove createTosaToStandard from Passes.cpp and
disable ElementwisePowModule_basic * Update nll_loss_forward to align to the change in PyTorch Signed-off-by: Anup Gangwar <[email protected]>
1 parent d69d29b commit abd61b4

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

e2e_testing/torchscript/nll_loss.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self):
2525
])
2626
# Here the 2nd index is ignored.
2727
def forward(self, x, y):
28-
return torch.ops.aten.nll_loss_forward(self=x,
28+
return torch.ops.aten.nll_loss_forward(x,
2929
target=y,
3030
weight=None,
3131
reduction=0,
@@ -50,7 +50,7 @@ def __init__(self):
5050
])
5151
# None of the index is ignored here, since the ignored index is out of bounds.
5252
def forward(self, x, y):
53-
return torch.ops.aten.nll_loss_forward(self=x,
53+
return torch.ops.aten.nll_loss_forward(x,
5454
target=y,
5555
weight=None,
5656
reduction=0,

e2e_testing/torchscript/xfail_sets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@
5050
"SqueezeDimModule_identity",
5151
"SqueezeDimModule_unitDim",
5252
"ReturnTwoTensorF32I64_basic",
53-
"ElementwisePowModule_basic",
5453
}

lib/Dialect/TorchConversion/Transforms/Passes.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,6 @@ void TorchConversion::createTorchBackendToTosaBackendPipeline(
102102
pm.addNestedPass<FuncOp>(createCSEPass());
103103
}
104104

105-
// Add the ToStandard pass for lowering some ops
106-
pm.addNestedPass<FuncOp>(createTosaToStandard());
107-
108105
// Finish the type conversion from `torch` types to the types of the
109106
// TOSA backend contract.
110107
pm.addPass(TorchConversion::createFuncBackendTypeConversionPass());

0 commit comments

Comments
 (0)