mirror of https://github.com/llvm/torch-mlir
453 lines
15 KiB
TableGen
453 lines
15 KiB
TableGen
//===-------------------------------------------------------*- tablegen -*-===//
|
|
//
|
|
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// Operation summaries and descriptions were systematically derived from public
|
|
// API docstrings and are licensed accordingly:
|
|
// https://github.com/pytorch/pytorch/blob/master/LICENSE
|
|
//===----------------------------------------------------------------------===//
|
|
// This file is automatically generated. Please do not edit.
|
|
// Generated via:
|
|
// python -m torch_mlir_utils.codegen.torch_signature_ods_gen
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Binary arithmetic ops
|
|
// -----------------------------------------------------------------------------
|
|
|
|
def aten_AddOp: aten_Op<"add", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::add";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other,
|
|
AnyTorchScalarType:$alpha
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_Atan2Op: aten_Op<"atan2", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::atan2";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_DivOp: aten_Op<"div", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::div";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_FloorDivideOp: aten_Op<"floor_divide", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::floor_divide";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_MulOp: aten_Op<"mul", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::mul";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_RemainderOp: aten_Op<"remainder", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::remainder";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_TrueDivideOp: aten_Op<"true_divide", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::true_divide";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self,
|
|
AnyTorchImmutableTensor:$other
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Unary arithmetic ops
|
|
// -----------------------------------------------------------------------------
|
|
|
|
def aten_AbsOp: aten_Op<"abs", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::abs";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_AcosOp: aten_Op<"acos", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::acos";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_AngleOp: aten_Op<"angle", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::angle";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_AsinOp: aten_Op<"asin", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::asin";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_AtanOp: aten_Op<"atan", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::atan";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_CeilOp: aten_Op<"ceil", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::ceil";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ConjOp: aten_Op<"conj", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::conj";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_CosOp: aten_Op<"cos", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::cos";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_CoshOp: aten_Op<"cosh", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::cosh";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_DigammaOp: aten_Op<"digamma", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::digamma";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ErfOp: aten_Op<"erf", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::erf";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ErfcOp: aten_Op<"erfc", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::erfc";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ErfinvOp: aten_Op<"erfinv", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::erfinv";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ExpOp: aten_Op<"exp", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::exp";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_Expm1Op: aten_Op<"expm1", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::expm1";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_FloorOp: aten_Op<"floor", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::floor";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_FracOp: aten_Op<"frac", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::frac";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_LgammaOp: aten_Op<"lgamma", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::lgamma";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_LogOp: aten_Op<"log", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::log";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_Log10Op: aten_Op<"log10", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::log10";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_Log1pOp: aten_Op<"log1p", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::log1p";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_Log2Op: aten_Op<"log2", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::log2";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_NegOp: aten_Op<"neg", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::neg";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ReluOp: aten_Op<"relu", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::relu";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_ReciprocalOp: aten_Op<"reciprocal", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::reciprocal";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_RoundOp: aten_Op<"round", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::round";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_RsqrtOp: aten_Op<"rsqrt", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::rsqrt";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_SigmoidOp: aten_Op<"sigmoid", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::sigmoid";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_SignOp: aten_Op<"sign", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::sign";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_SinOp: aten_Op<"sin", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::sin";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_SinhOp: aten_Op<"sinh", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::sinh";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_SqrtOp: aten_Op<"sqrt", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::sqrt";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_TanOp: aten_Op<"tan", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::tan";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_TanhOp: aten_Op<"tanh", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::tanh";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|
|
def aten_TruncOp: aten_Op<"trunc", [NoSideEffect, DeclareOpInterfaceMethods<TorchBuildableKernelOpInterface>, DeclareOpInterfaceMethods<TorchKernelOpInterface>]> {
|
|
let summary = "Recognized op for kernel aten::trunc";
|
|
let arguments = (ins
|
|
AnyTorchImmutableTensor:$self
|
|
);
|
|
let results = (outs
|
|
AnyTorchImmutableTensor
|
|
);
|
|
}
|
|
|