Skip to content

Commit bf594b0

Browse files
authored
[TOSA] Add reflection_pad3d lowering (llvm#3933)
- Add Torch to TOSA legalization for `aten.replication_pad3d` - Add new e2e tests and update xfail sets - Add new LIT test to basic.mlir
1 parent 356540a commit bf594b0

File tree

9 files changed

+501
-257
lines changed

9 files changed

+501
-257
lines changed

include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9997,6 +9997,30 @@ def Torch_AtenReflectionPad2dOp : Torch_Op<"aten.reflection_pad2d", [
99979997
}];
99989998
}
99999999

10000+
def Torch_AtenReflectionPad3dOp : Torch_Op<"aten.reflection_pad3d", [
10001+
AllowsTypeRefinement,
10002+
HasValueSemantics,
10003+
ReadOnly
10004+
]> {
10005+
let summary = "Generated op for `aten::reflection_pad3d : (Tensor, int[]) -> (Tensor)`";
10006+
let arguments = (ins
10007+
AnyTorchTensorType:$self,
10008+
AnyTorchListOfTorchIntType:$padding
10009+
);
10010+
let results = (outs
10011+
AnyTorchOptionalTensorType:$result
10012+
);
10013+
let hasCustomAssemblyFormat = 1;
10014+
let extraClassDefinition = [{
10015+
ParseResult AtenReflectionPad3dOp::parse(OpAsmParser &parser, OperationState &result) {
10016+
return parseDefaultTorchOp(parser, result, 2, 1);
10017+
}
10018+
void AtenReflectionPad3dOp::print(OpAsmPrinter &printer) {
10019+
printDefaultTorchOp(printer, *this, 2, 1);
10020+
}
10021+
}];
10022+
}
10023+
1000010024
def Torch_AtenPadOp : Torch_Op<"aten.pad", [
1000110025
AllowsTypeRefinement,
1000210026
HasValueSemantics,

0 commit comments

Comments
 (0)