.Input("x: T")
.Output("y: T")
.Attr(
- "T: {bfloat16, float, double, int8, uint8, int16, uint16, int32, "
+ "T: {bfloat16, half, float, double, int8, uint8, int16, uint16, int32, "
"int64, complex64, complex128, bool}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("Diag")
.Input("diagonal: T")
.Output("output: T")
- .Attr("T: {bfloat16, float, double, int32, int64, complex64, complex128}")
+ .Attr(
+ "T: {bfloat16, half, float, double, int32, int64, complex64, "
+ "complex128}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle in = c->input(0);
TF_RETURN_IF_ERROR(c->WithRankAtLeast(in, 1, &in));
REGISTER_OP("DiagPart")
.Input("input: T")
.Output("diagonal: T")
- .Attr("T: {bfloat16, float, double, int32, int64, complex64, complex128}")
+ .Attr(
+ "T: {bfloat16, half, float, double, int32, int64, complex64, "
+ "complex128}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle in = c->input(0);
if (!c->RankKnown(in)) {
.Output("output: T")
.Attr("Tidx: {int32, int64} = DT_INT32")
.Attr(
- "T: {uint8, int8, uint16, int16, int32, int64, bool, half, bfloat16, "
+ "T: {uint8, int8, uint16, int16, int32, int64, bool, bfloat16, half, "
"float, double, complex64, complex128, string}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle input = c->input(0);
REGISTER_OP("CheckNumerics")
.Input("tensor: T")
.Output("output: T")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.Attr("message: string")
.SetShapeFn(shape_inference::UnchangedShape);
.Output("output: type")
// All supported dtypes are listed here to include qint16 and quint16.
.Attr(
- "T: {bfloat16, float, double, int64, int32, uint8, uint16, int8, int16,"
- " complex64, complex128, qint8, quint8, qint16, quint16, qint32,"
- " half}")
+ "T: {bfloat16, half, float, double, int64, int32, uint8, uint16, int8, "
+ "int16, complex64, complex128, qint8, quint8, qint16, quint16, qint32}")
.Attr(
- "type: {bfloat16, float, double, int64, int32, uint8, uint16, int8, "
- "int16, complex64, complex128, qint8, quint8, qint16, quint16, qint32,"
- " half}")
+ "type: {bfloat16, half, float, double, int64, int32, uint8, uint16, "
+ "int8, int16, complex64, complex128, qint8, quint8, qint16, quint16, "
+ "qint32}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle input = c->input(0);
if (!c->RankKnown(input)) {
.Attr("input_min: float = 0")
.Attr("input_max: float = 0")
.Output("output: T")
- .Attr("T: {bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape)
.Deprecated(22, "Replaced by QuantizeAndDequantizeV2");
.Attr("num_bits: int = 8")
.Attr("range_given: bool = false")
.Output("output: T")
- .Attr("T: {bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle unused;
TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused));
.Attr("signed_input: bool = true")
.Attr("range_given: bool = true")
.Output("output: T")
- .Attr("T: {bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn([](InferenceContext* c) {
ShapeHandle unused;
TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 0, &unused));
.Input("x: T")
.Input("y: T")
.Output("output: T")
- .Attr("T: {half, bfloat16, float, double, int32, complex64, complex128}")
+ .Attr("T: {bfloat16, half, float, double, int32, complex64, complex128}")
.Attr("adj_x: bool = false")
.Attr("adj_y: bool = false")
.SetShapeFn([](InferenceContext* c) {
REGISTER_OP("Abs")
.Input("x: T")
.Output("y: T")
- .Attr("T: {half, bfloat16, float, double, int32, int64}")
+ .Attr("T: {bfloat16, half, float, double, int32, int64}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("ComplexAbs")
Input("x: T") \
.Output("y: T") \
.Attr( \
- "T: {half, bfloat16, float, double, int32, int64, complex64, " \
+ "T: {bfloat16, half, float, double, int32, int64, complex64, " \
"complex128}") \
.SetShapeFn(shape_inference::UnchangedShape)
#define UNARY_REAL() \
Input("x: T") \
.Output("y: T") \
- .Attr("T: {half, bfloat16, float, double}") \
+ .Attr("T: {bfloat16, half, float, double}") \
.SetShapeFn(shape_inference::UnchangedShape)
#define UNARY_COMPLEX() \
Input("x: T") \
.Output("y: T") \
- .Attr("T: {half, bfloat16, float, double, complex64, complex128}") \
+ .Attr("T: {bfloat16, half, float, double, complex64, complex128}") \
.SetShapeFn(shape_inference::UnchangedShape)
#define UNARY_GRADIENT_COMPLEX() \
Input("y: T") \
.Input("dy: T") \
.Output("z: T") \
- .Attr("T: {half, bfloat16, float, double, complex64, complex128}") \
+ .Attr("T: {bfloat16, half, float, double, complex64, complex128}") \
.SetShapeFn(shape_inference::UnchangedShape)
REGISTER_OP("Neg").UNARY();
REGISTER_OP("IsNan")
.Input("x: T")
.Output("y: bool")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("IsInf")
.Input("x: T")
.Output("y: bool")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("IsFinite")
.Input("x: T")
.Output("y: bool")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("Sign")
.Input("x: T")
.Output("y: T")
.Attr(
- "T: {half, bfloat16, float, double, int32, int64, complex64, "
+ "T: {bfloat16, half, float, double, int32, int64, complex64, "
"complex128}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("Floor")
.Input("x: T")
.Output("y: T")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("Ceil")
.Input("x: T")
.Output("y: T")
- .Attr("T: {half, bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
REGISTER_OP("Rint")
.Input("x: T")
.Output("y: T")
- .Attr("T: {bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::UnchangedShape);
// Declares cwise binary operations signature: 't, 't -> 't.
#define BINARY_MORE() \
Input("x: T").Input("y: T").Output("z: T").Attr( \
- "T: {half, bfloat16, float, double, uint8, int8, uint16, int16, int32, " \
+ "T: {bfloat16, half, float, double, uint8, int8, uint16, int16, int32, " \
"int64, complex64, complex128}")
#define BINARY_FEWER() \
Input("x: T").Input("y: T").Output("z: T").Attr( \
- "T: {half, bfloat16, float, double, int32, int64, complex64, " \
+ "T: {bfloat16, half, float, double, int32, int64, complex64, " \
"complex128}")
REGISTER_OP("Add")
.Input("y: T")
.Output("z: T")
.Attr(
- "T: {half, bfloat16, float, double, uint8, int8, int16, int32, int64, "
+ "T: {bfloat16, half, float, double, uint8, int8, int16, int32, int64, "
"complex64, complex128, string}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
.Input("y: T")
.Output("z: T")
.Attr(
- "T: {half, bfloat16, float, double, uint8, int8, int16, int32, int64, "
+ "T: {bfloat16, half, float, double, uint8, int8, int16, int32, int64, "
"complex64, complex128}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn)
.SetIsAggregate()
.Input("x: T")
.Input("y: T")
.Output("z: T")
- .Attr("T: {half, bfloat16, float, double, int32, int64}")
+ .Attr("T: {bfloat16, half, float, double, int32, int64}")
.SetIsCommutative()
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
.Input("x: T")
.Input("y: T")
.Output("z: T")
- .Attr("T: {half, bfloat16, float, double, int32, int64}")
+ .Attr("T: {bfloat16, half, float, double, int32, int64}")
.SetIsCommutative()
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
.Input("x: T")
.Input("y: T")
.Output("z: T")
- .Attr("T: {int32, int64, bfloat16, float, double}")
+ .Attr("T: {int32, int64, float16, half, bfloat16, float, double}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
REGISTER_OP("FloorMod")
.Input("x: T")
.Input("y: T")
.Output("z: T")
- .Attr("T: {int32, int64, bfloat16, float, double}")
+ .Attr("T: {int32, int64, bfloat16, half, float, double}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
REGISTER_OP("TruncateMod")
.Input("x: T")
.Input("y: T")
.Output("z: T")
- .Attr("T: {int32, int64, bfloat16, float, double}")
+ .Attr("T: {int32, int64, bfloat16, half, float, double}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
REGISTER_OP("Pow")
.Input("y: T")
.Output("z: T")
.Attr(
- "T: {half, bfloat16, float, double, int32, int64, complex64, "
+ "T: {bfloat16, float, half, double, int32, int64, complex64, "
"complex128}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
.Input("y: T")
.Input("x: T")
.Output("z: T")
- .Attr("T: {bfloat16, float, double}")
+ .Attr("T: {bfloat16, half, float, double}")
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn);
REGISTER_OP("Betainc")
.Output("z: bool") \
.SetIsCommutative() \
.Attr( \
- "T: {half, bfloat16, float, double, uint8, int8, int16, int32, " \
+ "T: {bfloat16, half, float, double, uint8, int8, int16, int32, " \
"int64, complex64, quint8, qint8, qint32, string, bool, " \
"complex128}") \
.SetShapeFn(shape_inference::BroadcastBinaryOpShapeFn)
.Output("product: T")
.Attr("transpose_a: bool = false")
.Attr("transpose_b: bool = false")
- .Attr("T: {half, bfloat16, float, double, int32, complex64, complex128}")
+ .Attr("T: {bfloat16, half, float, double, int32, complex64, complex128}")
.SetShapeFn(shape_inference::MatMulShape);
REGISTER_OP("SparseMatMul")