emit Torch_AtenAnyDimsOp

pull/3681/head
d00845784 2024-08-31 11:26:33 +08:00
parent 3180704b14
commit 2e0f7efe82
2 changed files with 26 additions and 0 deletions

View File

@ -10120,6 +10120,31 @@ def Torch_AtenAnyDimOp : Torch_Op<"aten.any.dim", [
}];
}
def Torch_AtenAnyDimsOp : Torch_Op<"aten.any.dims", [
AllowsTypeRefinement,
HasValueSemantics,
ReadOnly
]> {
let summary = "Generated op for `aten::any.dims : (Tensor, int[]?, bool) -> (Tensor)`";
let arguments = (ins
AnyTorchTensorType:$self,
AnyTorchOptionalListOfTorchIntType:$dim,
Torch_BoolType:$keepdim
);
let results = (outs
AnyTorchOptionalTensorType:$result
);
let hasCustomAssemblyFormat = 1;
let extraClassDefinition = [{
ParseResult AtenAnyDimsOp::parse(OpAsmParser &parser, OperationState &result) {
return parseDefaultTorchOp(parser, result, 3, 1);
}
void AtenAnyDimsOp::print(OpAsmPrinter &printer) {
printDefaultTorchOp(printer, *this, 3, 1);
}
}];
}
def Torch_AtenArangeOp : Torch_Op<"aten.arange", [
AllowsTypeRefinement,
HasValueSemantics,

View File

@ -785,6 +785,7 @@ def emit_ops(emitter_td: TextEmitter, registry: Registry):
emit("aten::all.dim : (Tensor, int, bool) -> (Tensor)")
emit("aten::any : (Tensor) -> (Tensor)")
emit("aten::any.dim : (Tensor, int, bool) -> (Tensor)")
emit("aten::any.dims : (Tensor, int[]?, bool) -> (Tensor)")
emit("aten::arange : (Scalar, int?, int?, Device?, bool?) -> (Tensor)")
emit(
"aten::arange.start : (Scalar, Scalar, int?, int?, Device?, bool?) -> (Tensor)"