Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sjain-stanford committed Oct 26, 2023
1 parent bbc05ff commit 52e3944
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions include/mlir-tcp/Dialect/IR/TcpTypes.td
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,10 @@ include "mlir/IR/DialectBase.td"

include "mlir-tcp/Dialect/IR/TcpBase.td"

//===----------------------------------------------------------------------===//
// Tcp Type Definitions
//===----------------------------------------------------------------------===//

def Tcp_IndexArrayType : Tcp_Type<"IndexArray", "index_array"> {
let summary = "IndexArray TCP type, to holds a list of index builtin type to represent shape";
}

//===----------------------------------------------------------------------===//
// Tcp Quantized Types
//===----------------------------------------------------------------------===//

// The base class of a quantized type.
// Param tuple is: [bitwidth, zero_pt, s_mantissa, s_exp, low_end, high_end].
// Where low and high ends are 0,255 when unsigned, -128,127 when signed, for
Expand All @@ -40,7 +32,6 @@ class Tcp_QuantizedType<string n, list<int> params, bit signed>
string asTraitArgsStr = !interleave(params, ", ") #
!if(signed, ", true", ", false");
}

//===----------------------------------------------------------------------===//
// Name Symmetry Sign
//===----------------------------------------------------------------------===//
Expand All @@ -54,8 +45,9 @@ def Tcp_QuantizedInt : AnyTypeOf<[Tcp_QuantizedType<"q8ua", [8], 0>,
Tcp_QuantizedType<"q8ss", [8, 0], 1>,
Tcp_QuantizedType<"q16ss", [16, 0], 1>]>;


//===----------------------------------------------------------------------===//
// Tcp Container Types
// Tcp Basic Types
//===----------------------------------------------------------------------===//

def Tcp_Scalar : AnyTypeOf<[AnyFloat, AnySignlessInteger, Tcp_QuantizedInt]>;
Expand All @@ -65,4 +57,13 @@ def Tcp_TensorOrScalar : AnyTypeOf<[Tcp_Tensor, Tcp_Scalar]>;
def Tcp_FloatTensor : RankedTensorOf<[AnyFloat]>;
def Tcp_FloatOrIntTensor : RankedTensorOf<[AnyFloat, AnySignlessInteger]>;


//===----------------------------------------------------------------------===//
// Tcp Custom Types
//===----------------------------------------------------------------------===//

def Tcp_IndexArrayType : Tcp_Type<"IndexArray", "index_array"> {
let summary = "IndexArray TCP type, to holds a list of index builtin type to represent shape";
}

#endif // TCP_TYPES

0 comments on commit 52e3944

Please sign in to comment.