MLIR
20.0.0git
|
#include "mlir/Dialect/Traits.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "llvm/Support/FormatVariadic.h"
#include <optional>
Go to the source code of this file.
Functions | |
static ArrayRef< int64_t > | getShape (Type type) |
Returns the shape of the given type. More... | |
template<typename iterator_range > | |
static std::tuple< bool, bool > | hasTensorOrVectorType (iterator_range types) |
Returns a tuple corresponding to whether range has tensor or vector type. More... | |
static bool | isCompatibleInferredReturnShape (ArrayRef< int64_t > inferred, ArrayRef< int64_t > existing) |
static std::string | getShapeString (ArrayRef< int64_t > shape) |
Returns the shape of the given type.
Scalars will be considered as having a shape with zero dimensions.
Definition at line 118 of file Traits.cpp.
Referenced by mlir::quant::QuantizedType::castFromStorageType(), and mlir::OpTrait::util::getBroadcastedType().
|
static |
Definition at line 210 of file Traits.cpp.
|
static |
Returns a tuple corresponding to whether range has tensor or vector type.
Definition at line 190 of file Traits.cpp.
|
static |
Definition at line 195 of file Traits.cpp.