| /llvm-project-15.0.7/mlir/lib/IR/ |
| H A D | BuiltinAttributeInterfaces.cpp | 27 ShapedType ElementsAttr::getType() const { in getType() 31 Type ElementsAttr::getElementType(Attribute elementsAttr) { in getElementType() 35 int64_t ElementsAttr::getNumElements(Attribute elementsAttr) { in getNumElements() 39 bool ElementsAttr::isValidIndex(ShapedType type, ArrayRef<uint64_t> index) { in isValidIndex() 54 bool ElementsAttr::isValidIndex(Attribute elementsAttr, in isValidIndex() 59 uint64_t ElementsAttr::getFlattenedIndex(Type type, ArrayRef<uint64_t> index) { in getFlattenedIndex()
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/ |
| H A D | CommonFolders.h | 63 } else if (operands[0].isa<ElementsAttr>() && in constFoldBinaryOpConditional() 64 operands[1].isa<ElementsAttr>()) { in constFoldBinaryOpConditional() 67 auto lhs = operands[0].cast<ElementsAttr>(); in constFoldBinaryOpConditional() 68 auto rhs = operands[1].cast<ElementsAttr>(); in constFoldBinaryOpConditional() 127 } else if (operands[0].isa<ElementsAttr>()) { in constFoldUnaryOpConditional() 130 auto op = operands[0].cast<ElementsAttr>(); in constFoldUnaryOpConditional() 186 if (operands[0].isa<ElementsAttr>()) { in constFoldCastOp() 189 auto op = operands[0].cast<ElementsAttr>(); in constFoldCastOp()
|
| /llvm-project-15.0.7/mlir/unittests/Dialect/Quant/ |
| H A D | QuantizationUtilsTest.cpp | 53 ElementsAttr getTestSparseElementsAttr(MLIRContext *ctx, in getTestSparseElementsAttr() 117 returnedValue.cast<ElementsAttr>().getValues<Attribute>()[{0, 0}]; in TEST() 143 returnedValue.cast<ElementsAttr>().getValues<Attribute>()[{0, 0}]; in TEST() 168 returnedValue.cast<ElementsAttr>().getValues<Attribute>()[{0, 0}]; in TEST()
|
| /llvm-project-15.0.7/mlir/include/mlir/IR/ |
| H A D | BuiltinAttributeInterfaces.td | 9 // This file contains the definition of the ElementsAttr interface. 22 def ElementsAttrInterface : AttrInterface<"ElementsAttr"> { 87 After the above, ElementsAttr will now be able to iterate over elements 91 ElementsAttr attr = myI64ElementsAttr; 109 ElementsAttr also supports failable access to iterators and ranges. This 177 /// Return the element type of this ElementsAttr. 179 return ::mlir::ElementsAttr::getElementType($_attr); 184 return ::mlir::ElementsAttr::getNumElements($_attr); 189 return ::mlir::ElementsAttr::isValidIndex($_attr, index); 196 return ::mlir::ElementsAttr::getFlattenedIndex($_attr, index); [all …]
|
| H A D | BuiltinAttributeInterfaces.h | 295 return (*this)[ElementsAttr::getFlattenedIndex(shapeType, index)]; 301 auto ElementsAttr::value_begin() const -> DefaultValueCheckT<T, iterator<T>> { 310 auto ElementsAttr::try_value_begin() const
|
| H A D | ValueRange.h | 25 class ElementsAttr; variable 57 OperandRangeRange split(ElementsAttr segmentSizes) const;
|
| H A D | BuiltinAttributes.td | 185 /// Allow implicit conversion to ElementsAttr. 186 operator ElementsAttr() const { 187 return *this ? cast<ElementsAttr>() : nullptr; 190 /// ElementsAttr implementation. 278 /// Provide a `value_begin_impl` to enable iteration within ElementsAttr. 406 /// Provide a `value_begin_impl` to enable iteration within ElementsAttr. 795 bool decode(ElementsAttr &result); 859 // FIXME: Realistically, SparseElementsAttr could use ElementsAttr for the 878 using ElementsAttr::Trait<SparseElementsAttr>::getValues; 880 /// Provide a `value_begin_impl` to enable iteration within ElementsAttr.
|
| H A D | OperationSupport.h | 37 class ElementsAttr; variable 792 bool shouldElideElementsAttr(ElementsAttr attr) const;
|
| H A D | BuiltinAttributes.h | 77 operator ElementsAttr() const { 78 return *this ? cast<ElementsAttr>() : nullptr;
|
| /llvm-project-15.0.7/mlir/test/lib/IR/ |
| H A D | TestBuiltinAttributeInterfaces.cpp | 40 auto elementsAttr = attr.getValue().dyn_cast<ElementsAttr>(); in runOnOperation() 76 void testElementsAttrIteration(Operation *op, ElementsAttr attr, in testElementsAttrIteration()
|
| /llvm-project-15.0.7/mlir/include/mlir/Interfaces/ |
| H A D | DecodeAttributesInterfaces.h | 30 ElementsAttr &output) const { in decode()
|
| /llvm-project-15.0.7/mlir/test/IR/ |
| H A D | elements-attr-interface.mlir | 6 // This test contains various `ElementsAttr` attributes, and tests the support 8 // This tests that the abstract iteration of ElementsAttr works properly, and
|
| /llvm-project-15.0.7/mlir/lib/CAPI/IR/ |
| H A D | BuiltinAttributes.cpp | 294 return unwrap(attr).isa<ElementsAttr>(); in mlirAttributeIsAElements() 300 .cast<ElementsAttr>() in mlirElementsAttrGetValue() 306 return unwrap(attr).cast<ElementsAttr>().isValidIndex( in mlirElementsAttrIsValidIndex() 311 return unwrap(attr).cast<ElementsAttr>().getNumElements(); in mlirElementsAttrGetNumElements()
|
| /llvm-project-15.0.7/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/ |
| H A D | mlir-support.gdb | 144 # CHECK-LABEL: +print ElementsAttr 145 print ElementsAttr
|
| H A D | mlir-support.cpp | 40 mlir::Attribute ElementsAttr = mlir::DenseElementsAttr::get( variable
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/ |
| H A D | UniformSupport.cpp | 51 ElementsAttr
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/ |
| H A D | BufferUtils.cpp | 190 /*initial_value=*/constantOp.getValue().cast<ElementsAttr>(), in getGlobalFor()
|
| /llvm-project-15.0.7/mlir/test/lib/Dialect/Tosa/ |
| H A D | TosaTestPasses.cpp | 85 ElementsAttr inputElems; in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/Quant/ |
| H A D | UniformSupport.h | 194 ElementsAttr convert(Attribute realValue);
|
| H A D | QuantOps.td | 226 ElementsAttr:$layerStats, 227 OptionalAttr<ElementsAttr>:$axisStats,
|
| /llvm-project-15.0.7/mlir/test/mlir-tblgen/ |
| H A D | op-attribute.td | 276 ElementsAttr:$elements_attr, 297 // DEF: if (tblgen_elements_attr && !((tblgen_elements_attr.isa<::mlir::ElementsAttr>()))) 314 // DEF: ::mlir::ElementsAttr BOp::elements_attr()
|
| /llvm-project-15.0.7/mlir/lib/Transforms/ |
| H A D | ViewOpGraph.cpp | 145 auto elements = attr.dyn_cast<ElementsAttr>(); in emitMlirAttr()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/ |
| H A D | SPIRVCanonicalization.cpp | 59 if (auto vector = composite.dyn_cast<ElementsAttr>()) { in extractCompositeElement()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/ |
| H A D | LLVMDialect.cpp | 320 ElementsAttr caseValuesAttr; in build() 324 ElementsAttr weightsAttr; in build() 335 OpAsmParser &parser, Type flagType, ElementsAttr &caseValues, in parseSwitchOpCases() 374 ElementsAttr caseValues, in printSwitchOpCases() 1978 if (auto elementsValue = value.dyn_cast<ElementsAttr>()) in isZeroAttribute() 2424 if (!getValue().isa<IntegerAttr, ArrayAttr, FloatAttr, ElementsAttr>()) in verify()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/IR/ |
| H A D | MemRefOps.cpp | 1289 if (!initialValue.isa<ElementsAttr>()) in parseGlobalMemrefOpTypeAndInitialValue() 1305 if (!initValue.isa<UnitAttr>() && !initValue.isa<ElementsAttr>()) in verify() 1312 if (initValue.isa<ElementsAttr>()) { in verify() 1333 ElementsAttr GlobalOp::getConstantInitValue() { in getConstantInitValue() 1336 return initVal.value().cast<ElementsAttr>(); in getConstantInitValue()
|