// ============================================================================
// = Please keep the patterns in alphabetical order by operator name =
// ============================================================================
Pattern ConvertMfuseAbs {
let root = op<mfuse.abs>(input: Value) -> (result: Type);
replace root with op<torch.aten.abs>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseCeil {
let root = op<mfuse.ceil>(input: Value) -> (result: Type);
replace root with op<torch.aten.ceil>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseExp {
let root = op<mfuse.exp>(operand: Value) -> (resType: Type);
replace root with op<torch.aten.exp>(convertValue(operand)) -> (convertType(resType));
}
Pattern ConvertMfuseFloor {
let root = op<mfuse.floor>(input: Value) -> (result: Type);
replace root with op<torch.aten.floor>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseIsFinite {
let root = op<mfuse.is_finite>(input: Value) -> (result: Type);
replace root with op<torch.aten.isfinite>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseLog {
let root = op<mfuse.log>(input: Value) -> (result: Type);
replace root with op<torch.aten.log>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseLogicalAnd {
let root = op<mfuse.logical_and>(operands: ValueRange) -> (result: Type);
replace root with op<torch.aten.logical_and>(convertValues(operands)) -> (convertType(result));
}
Pattern ConvertMfuseLogicalNot {
let root = op<mfuse.logical_not>(input: Value) -> (result: Type);
replace root with op<torch.aten.logical_not>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseLogicalOr {
let root = op<mfuse.logical_or>(operands: ValueRange) -> (result: Type);
replace root with op<torch.aten.logical_or>(convertValues(operands)) -> (convertType(result));
}
Pattern ConvertMfuseMaximum {
let root = op<mfuse.maximum>(operands: ValueRange) -> (result: Type);
replace root with op<torch.aten.maximum>(convertValues(operands)) -> (convertType(result));
}
Pattern ConvertMfuseMinimum {
let root = op<mfuse.minimum>(operands: ValueRange) -> (result: Type);
replace root with op<torch.aten.minimum>(convertValues(operands)) -> (convertType(result));
}
Pattern ConvertMfuseNeg {
let root = op<mfuse.neg>(input: Value) -> (result: Type);
replace root with op<torch.aten.neg>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfusePow {
let root = op<mfuse.pow>(operands: ValueRange) -> (result: Type);
replace root with op<torch.aten.pow.Tensor_Tensor>(convertValues(operands)) -> (convertType(result));
}
Pattern ConvertMfuseRsqrt {
let root = op<mfuse.rsqrt>(input: Value) -> (result: Type);
replace root with op<torch.aten.rsqrt>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseReciprocal {
let root = op<mfuse.reciprocal>(input: Value) -> (result: Type);
replace root with op<torch.aten.reciprocal>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseRelu {
let root = op<mfuse.relu>(input: Value) -> (result: Type);
replace root with op<torch.aten.relu>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseSelect {
let root = op<mfuse.select>(condition: Value, on_true: Value, on_false: Value) -> (result: Type);
replace root with op<torch.aten.where.self>(convertValue(condition), convertValue(on_true), convertValue(on_false)) -> (convertType(result));
}
Pattern ConvertMfuseSqrt {
let root = op<mfuse.sqrt>(input: Value) -> (result: Type);
replace root with op<torch.aten.sqrt>(convertValue(input)) -> (convertType(result));
}
Pattern ConvertMfuseTrunc {
let root = op<mfuse.trunc>(input: Value) -> (result: Type);
replace root with op<torch.aten.trunc>(convertValue(input)) -> (convertType(result));
}