Searched refs:elementsAttr (Results 1 – 6 of 6) sorted by relevance
| /llvm-project-15.0.7/mlir/test/lib/IR/ |
| H A D | TestBuiltinAttributeInterfaces.cpp | 40 auto elementsAttr = attr.getValue().dyn_cast<ElementsAttr>(); in runOnOperation() local 41 if (!elementsAttr) in runOnOperation() 47 testElementsAttrIteration<int8_t>(op, elementsAttr, "int8_t"); in runOnOperation() 50 testElementsAttrIteration<int16_t>(op, elementsAttr, "int16_t"); in runOnOperation() 53 testElementsAttrIteration<int32_t>(op, elementsAttr, "int32_t"); in runOnOperation() 56 testElementsAttrIteration<int64_t>(op, elementsAttr, "int64_t"); in runOnOperation() 59 testElementsAttrIteration<float>(op, elementsAttr, "float"); in runOnOperation() 62 testElementsAttrIteration<double>(op, elementsAttr, "double"); in runOnOperation() 67 testElementsAttrIteration<int64_t>(op, elementsAttr, "int64_t"); in runOnOperation() 68 testElementsAttrIteration<uint64_t>(op, elementsAttr, "uint64_t"); in runOnOperation() [all …]
|
| /llvm-project-15.0.7/mlir/lib/IR/ |
| H A D | BuiltinAttributeInterfaces.cpp | 31 Type ElementsAttr::getElementType(Attribute elementsAttr) { in getElementType() argument 32 return elementsAttr.getType().cast<ShapedType>().getElementType(); in getElementType() 35 int64_t ElementsAttr::getNumElements(Attribute elementsAttr) { in getNumElements() argument 36 return elementsAttr.getType().cast<ShapedType>().getNumElements(); in getNumElements() 54 bool ElementsAttr::isValidIndex(Attribute elementsAttr, in isValidIndex() argument 56 return isValidIndex(elementsAttr.getType().cast<ShapedType>(), index); in isValidIndex()
|
| /llvm-project-15.0.7/mlir/include/mlir/IR/ |
| H A D | BuiltinAttributeInterfaces.td | 302 static Type getElementType(Attribute elementsAttr); 309 static bool isValidIndex(Attribute elementsAttr, ArrayRef<uint64_t> index); 318 static uint64_t getFlattenedIndex(Attribute elementsAttr, 320 return getFlattenedIndex(elementsAttr.getType(), index); 325 static int64_t getNumElements(Attribute elementsAttr);
|
| /llvm-project-15.0.7/mlir/lib/Target/LLVMIR/ |
| H A D | ModuleTranslation.cpp | 360 if (auto elementsAttr = attr.dyn_cast<ElementsAttr>()) { in getLLVMConstant() local 361 assert(elementsAttr.getType().hasStaticShape()); in getLLVMConstant() 362 assert(!elementsAttr.getType().getShape().empty() && in getLLVMConstant() 366 constants.reserve(elementsAttr.getNumElements()); in getLLVMConstant() 368 for (auto n : elementsAttr.getValues<Attribute>()) { in getLLVMConstant() 376 constantsRef, elementsAttr.getType().getShape(), llvmType, loc); in getLLVMConstant()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Tensor/IR/ |
| H A D | TensorOps.cpp | 452 auto elementsAttr = tensor.dyn_cast<ElementsAttr>(); in fold() local 453 if (elementsAttr && elementsAttr.isValidIndex(indices)) in fold() 454 return elementsAttr.getValues<Attribute>()[indices]; in fold()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToLLVM/ |
| H A D | MemRefToLLVM.cpp | 614 auto elementsAttr = global.getInitialValue()->cast<ElementsAttr>(); in matchAndRewrite() local 615 initialValue = elementsAttr; in matchAndRewrite() 620 initialValue = elementsAttr.getSplatValue<Attribute>(); in matchAndRewrite()
|