Allow index inside dimension tensors.
Ever since https://reviews.llvm.org/rG3dceb6d2460550ef8c2e53df2181c8a11a7e6730 MLIR now allows `index` type inside tensors, addressing this longstanding TODO. PiperOrigin-RevId: 306391413 Change-Id: I797623de02ff031b9ffabfaee81afba91ead6692
This commit is contained in:
parent
242129341e
commit
b2418b7fee
@ -55,11 +55,10 @@ def HLO_Tuple : NestedTupleOf<[HLO_Tensor, HLO_Token]>;
|
|||||||
|
|
||||||
def HLO_TensorOrTuple : AnyTypeOf<[HLO_Tensor, HLO_Tuple]>;
|
def HLO_TensorOrTuple : AnyTypeOf<[HLO_Tensor, HLO_Tuple]>;
|
||||||
|
|
||||||
// Dynamic representation of a shape vector as a tensor. Ideally this would be
|
// Dynamic representation of a shape vector as a tensor.
|
||||||
// an index type (as it stores indices) but that is currently disallowed in
|
|
||||||
// MLIR.
|
|
||||||
def HLO_DimensionTensor : ShapedContainerType<
|
def HLO_DimensionTensor : ShapedContainerType<
|
||||||
[AnySignlessInteger], And<[IsTensorTypePred, HasAnyRankOfPred<[1]>]>,
|
[Index, AnySignlessInteger],
|
||||||
|
And<[IsTensorTypePred, HasAnyRankOfPred<[1]>]>,
|
||||||
"a 1D tensor of dimensions">;
|
"a 1D tensor of dimensions">;
|
||||||
|
|
||||||
// In general, static shaped tensor constraints should be avoided unless
|
// In general, static shaped tensor constraints should be avoided unless
|
||||||
|
Loading…
Reference in New Issue
Block a user