MLIR 22.0.0git
ConversionUtils.h File Reference

Go to the source code of this file.

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::tosa

Functions

SmallVector< utils::IteratorType > mlir::tosa::getNParallelLoopsAttrs (unsigned nParallelLoops)
SmallVector< Valuemlir::tosa::condenseValues (const SmallVector< Value > &values)
Value mlir::tosa::clampFloatHelper (Location loc, Value arg, Value min, Value max, OpBuilder &rewriter)
Value mlir::tosa::clampIntHelper (Location loc, Value arg, Value min, Value max, OpBuilder &rewriter, bool isUnsigned)
bool mlir::tosa::validIntegerRange (IntegerType ty, int64_t value)
template<typename Op>
std::optional< SmallVector< Value > > mlir::tosa::checkHasDynamicBatchDims (PatternRewriter &rewriter, Op op, ArrayRef< Value > params)
LogicalResult mlir::tosa::EqualizeRanks (PatternRewriter &rewriter, Location loc, Value &input1, Value &input2)
 Common code to create the reshape op where necessary to make the rank of two values equal.
LogicalResult mlir::tosa::EqualizeRanks (ImplicitLocOpBuilder &builder, Value &input1, Value &input2)
template<typename TosaOp, typename... Args>
TosaOp mlir::tosa::CreateOpAndInferShape (ImplicitLocOpBuilder &builder, Type resultTy, Args &&...args)
template<typename TosaOp, typename... Args>
TosaOp mlir::tosa::CreateOpAndInferShape (PatternRewriter &rewriter, Location loc, Type resultTy, Args &&...args)
template<typename T>
SmallVector< T > mlir::tosa::applyTOSAPermutation (ArrayRef< T > input, ArrayRef< int32_t > perms)
Value mlir::tosa::getTosaConstShape (ImplicitLocOpBuilder &builder, llvm::ArrayRef< int64_t > shape)
Value mlir::tosa::getTosaConstShape (PatternRewriter &rewriter, Location loc, llvm::ArrayRef< int64_t > shape)
SmallVector< int64_tmlir::tosa::convertFromMlirShape (ArrayRef< int64_t > shape)
bool mlir::tosa::getConstShapeValues (Operation *op, llvm::SmallVector< int64_t > &result_shape)
SmallVector< int64_tmlir::tosa::convertFromIntAttr (const DenseElementsAttr &attr, const int rank)
bool mlir::tosa::hasUniqueConstantScatterIndices (ShapedType indicesType, DenseIntElementsAttr indicesAttr)