9 #ifndef MLIR_DIALECT_TENSOR_UTILS_UTILS_H_
10 #define MLIR_DIALECT_TENSOR_UTILS_UTILS_H_
30 PadOp
createPadHighOp(RankedTensorType resType, Value source, Value pad,
31 bool nofold, Location loc, OpBuilder &builder,
32 SmallVector<Value> dynOutDim = {});
41 FailureOr<RankedTensorType>
43 ArrayRef<int64_t> transposeVector);
62 PackingMetadata &metadata);
SmallVector< int64_t > getUnPackInverseSrcPerm(tensor::UnPackOp unpackOp)
Shell function to compute the Source Permutation of unPackOp.
SmallVector< Value > createDynamicDimValues(OpBuilder &b, Location loc, Value rankedTensor)
bool isCastLikeInsertSliceOp(InsertSliceOp op)
A tensor.insert_slice is a cast-like operation if it merely rank-extends the source tensor or inserts...
bool isCastLikeExtractSliceOp(ExtractSliceOp op)
A tensor.extract_slice is a cast-like operation if it merely rank-reduces unit dimensions of the sour...
SmallVector< int64_t > getPackInverseDestPerm(tensor::PackOp packOp)
Shell function to compute the Destination Permutation of PackOp This function uses the helper functio...
PadOp createPadHighOp(RankedTensorType resType, Value source, Value pad, bool nofold, Location loc, OpBuilder &builder, SmallVector< Value > dynOutDim={})
FailureOr< RankedTensorType > computeTransposedType(RankedTensorType rankedTensorType, ArrayRef< int64_t > transposeVector)
Returns the transposed rankedTensorType if transposeVector is non-empty.
Include the generated interface declarations.