From 6d241dfd53942939eb5b758d7a63fede31e5c5cd Mon Sep 17 00:00:00 2001 From: Geoffrey Martin-Noble Date: Thu, 23 May 2019 14:41:32 -0700 Subject: [PATCH] Rename Float/Integer to AnyFloat/AnyInteger This emphasizes that it is potentially less constrained than you might desire (especially dialects will frequently not support all bit widths), and better matches the other type names, especially the container types. -- PiperOrigin-RevId: 249718409 --- mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td | 4 ++-- mlir/include/mlir/IR/OpBase.td | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td b/mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td index d000946..cc51aa6 100644 --- a/mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td +++ b/mlir/include/mlir/Dialect/QuantOps/QuantPredicates.td @@ -39,13 +39,13 @@ def quant_QuantizedType : // A primitive type that can represent a real value. This is either a // floating point value or a quantized type. def quant_RealPrimitiveType : - Type, + Type, "real valued primitive (float or quantized type)">; // A primitive type that can represent a storage value. This is either an // integer or quantized type. def quant_StoragePrimitiveType : - Type, + Type, "quantized storage primitive (integer or quantized type)">; // A primitive or container of RealPrimitiveType. diff --git a/mlir/include/mlir/IR/OpBase.td b/mlir/include/mlir/IR/OpBase.td index 2d4bf2d..6cffc49 100644 --- a/mlir/include/mlir/IR/OpBase.td +++ b/mlir/include/mlir/IR/OpBase.td @@ -283,7 +283,7 @@ class AnyTypeOf allowedTypes, string description = ""> : Type< // Integer types. // Any integer type irrespective of its width. -def Integer : Type()">, "integer">; +def AnyInteger : Type()">, "integer">; // Index type. def Index : Type()">, "index">; @@ -309,7 +309,7 @@ def I64 : I<64>; // Floating point types. // Any float type irrespective of its width. -def Float : Type()">, "floating-point">; +def AnyFloat : Type()">, "floating-point">; // Float type of a specific width. class F @@ -438,13 +438,13 @@ class TupleOf : // Type constraint for integer-like types: integers, indices, vectors of // integers, tensors of integers. -def IntegerLike : TypeConstraint.predicate, TensorOf<[Integer]>.predicate]>, +def IntegerLike : TypeConstraint.predicate, TensorOf<[AnyInteger]>.predicate]>, "integer-like">; // Type constraint for float-like types: floats, vectors or tensors thereof. -def FloatLike : TypeConstraint.predicate, TensorOf<[Float]>.predicate]>, +def FloatLike : TypeConstraint.predicate, TensorOf<[AnyFloat]>.predicate]>, "floating-point-like">; -- 2.7.4