Add HLO_ScalarIntTensor type to HLO dialect.

PiperOrigin-RevId: 305821689
Change-Id: Id6dc37b2050a4ae7cf334d94095fe1d6af7af559
This commit is contained in:
Lucy Fox 2020-04-09 21:35:39 -07:00 committed by TensorFlower Gardener
parent c6430443c5
commit 84ff3e44b2

View File

@ -37,6 +37,11 @@ def HLO_Token : Type<CPred<"$_self.isa<TokenType>()">, "token">;
// Any integer tensor types
def HLO_IntTensor : TensorOf<[HLO_Int]>;
// Any integer tensor type with rank 0 (i.e. representing a single integer).
def HLO_ScalarIntTensor : ShapedContainerType<
[HLO_Int], And<[IsTensorTypePred, HasAnyRankOfPred<[0]>]>,
"a 0-dim integer tensor">;
// Any floating-point tensor types
def HLO_FpTensor : TensorOf<[AnyFloat]>;