tensor_shape_base.td 1017 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#ifdef TS_OPS_BASE
#else
#define TS_OPS_BASE

// Tensor shape dialect.
def TensorShapeDialect : Dialect {
    let name = "ts";

    let description = [{
        The Tensor Shape dialect.

        This dialect contains operations for working with tensor shapes.
    }];

    let cppNamespace = "::infrt::ts";
}

// Type definition.
def TS_Shape : DialectType<TensorShapeDialect,
CPred<"$_self.isa<::infrt::ts::ShapeType>()">, "!ts.shape type">,
BuildableType<"$_builder.getType<::infrt::ts::ShapeType>()"> {
22
    let description = [{
Y
Yan Chunwei 已提交
23 24 25 26 27 28 29
        `!ts.shape type` represents a static tensor shape.
}];
}

def TS_PartialShape : DialectType<TensorShapeDialect,
CPred<"$_self.isa<::infrt::ts::PartialShapeType>()">, "!ts.partial_shape type">,
BuildableType<"$_builder.getType<::infrt::ts::PartialShapeType>()"> {
30
    let description = [{
Y
Yan Chunwei 已提交
31 32 33 34 35 36
        `!ts.partial_shape type` represents either a static tensor shape, unranked
        tensor shape or a ranked tensor shape with unknown dimension sizes.
}];
}

#endif  // TS_OPS_BASE