[mlir] Add InferTensorType without supporting reifyReturnTypeShapes
This is useful for the case that we don't need to implement reifyReturnTypeShapes. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D121403
This commit is contained in:
parent
f80aaa675f
commit
dda003afa6
|
@ -135,7 +135,7 @@ def InferShapedTypeOpInterface : OpInterface<"InferShapedTypeOpInterface"> {
|
||||||
|
|
||||||
// Convenience class grouping together type and shaped type op interfaces for
|
// Convenience class grouping together type and shaped type op interfaces for
|
||||||
// ops that have tensor return types.
|
// ops that have tensor return types.
|
||||||
class InferTensorType<list<string> overridenMethods = []> : TraitList<
|
class InferTensorTypeBase<list<string> overridenMethods = []> : TraitList<
|
||||||
[
|
[
|
||||||
// Op implements infer type op interface.
|
// Op implements infer type op interface.
|
||||||
InferTypeOpInterface,
|
InferTypeOpInterface,
|
||||||
|
@ -146,9 +146,10 @@ class InferTensorType<list<string> overridenMethods = []> : TraitList<
|
||||||
// along with knowledge that it is producing Tensors to infer the type.
|
// along with knowledge that it is producing Tensors to infer the type.
|
||||||
NativeOpTrait<"InferTensorType">
|
NativeOpTrait<"InferTensorType">
|
||||||
]>;
|
]>;
|
||||||
def InferTensorTypeWithReify: TraitList<InferTensorType<[
|
|
||||||
"inferReturnTypeComponents", "reifyReturnTypeShapes"]>.traits>;
|
|
||||||
|
|
||||||
|
def InferTensorType : InferTensorTypeBase<["inferReturnTypeComponents"]>;
|
||||||
|
def InferTensorTypeWithReify: InferTensorTypeBase<[
|
||||||
|
"inferReturnTypeComponents", "reifyReturnTypeShapes"]>;
|
||||||
|
|
||||||
def ReifyRankedShapedTypeOpInterface :
|
def ReifyRankedShapedTypeOpInterface :
|
||||||
OpInterface<"ReifyRankedShapedTypeOpInterface"> {
|
OpInterface<"ReifyRankedShapedTypeOpInterface"> {
|
||||||
|
|
Loading…
Reference in New Issue