Home
last modified time | relevance | path

Searched refs:ElementsAttr (Results 1 – 25 of 42) sorted by relevance

12

/llvm-project-15.0.7/mlir/lib/IR/
H A DBuiltinAttributeInterfaces.cpp27 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 DCommonFolders.h63 } 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 DQuantizationUtilsTest.cpp53 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 DBuiltinAttributeInterfaces.td9 // 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 DBuiltinAttributeInterfaces.h295 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 DValueRange.h25 class ElementsAttr; variable
57 OperandRangeRange split(ElementsAttr segmentSizes) const;
H A DBuiltinAttributes.td185 /// 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 DOperationSupport.h37 class ElementsAttr; variable
792 bool shouldElideElementsAttr(ElementsAttr attr) const;
H A DBuiltinAttributes.h77 operator ElementsAttr() const {
78 return *this ? cast<ElementsAttr>() : nullptr;
/llvm-project-15.0.7/mlir/test/lib/IR/
H A DTestBuiltinAttributeInterfaces.cpp40 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 DDecodeAttributesInterfaces.h30 ElementsAttr &output) const { in decode()
/llvm-project-15.0.7/mlir/test/IR/
H A Delements-attr-interface.mlir6 // 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 DBuiltinAttributes.cpp294 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 Dmlir-support.gdb144 # CHECK-LABEL: +print ElementsAttr
145 print ElementsAttr
H A Dmlir-support.cpp40 mlir::Attribute ElementsAttr = mlir::DenseElementsAttr::get( variable
/llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/
H A DUniformSupport.cpp51 ElementsAttr
/llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/
H A DBufferUtils.cpp190 /*initial_value=*/constantOp.getValue().cast<ElementsAttr>(), in getGlobalFor()
/llvm-project-15.0.7/mlir/test/lib/Dialect/Tosa/
H A DTosaTestPasses.cpp85 ElementsAttr inputElems; in matchAndRewrite()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Quant/
H A DUniformSupport.h194 ElementsAttr convert(Attribute realValue);
H A DQuantOps.td226 ElementsAttr:$layerStats,
227 OptionalAttr<ElementsAttr>:$axisStats,
/llvm-project-15.0.7/mlir/test/mlir-tblgen/
H A Dop-attribute.td276 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 DViewOpGraph.cpp145 auto elements = attr.dyn_cast<ElementsAttr>(); in emitMlirAttr()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVCanonicalization.cpp59 if (auto vector = composite.dyn_cast<ElementsAttr>()) { in extractCompositeElement()
/llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/
H A DLLVMDialect.cpp320 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 DMemRefOps.cpp1289 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()

12