Home
last modified time | relevance | path

Searched refs:DenseIntElementsAttr (Results 1 – 25 of 54) sorted by relevance

123

/llvm-project-15.0.7/mlir/lib/IR/
H A DBuilders.cpp103 DenseIntElementsAttr Builder::getBoolVectorAttr(ArrayRef<bool> values) { in getBoolVectorAttr()
104 return DenseIntElementsAttr::get( in getBoolVectorAttr()
109 DenseIntElementsAttr Builder::getI32VectorAttr(ArrayRef<int32_t> values) { in getI32VectorAttr()
110 return DenseIntElementsAttr::get( in getI32VectorAttr()
115 DenseIntElementsAttr Builder::getI64VectorAttr(ArrayRef<int64_t> values) { in getI64VectorAttr()
116 return DenseIntElementsAttr::get( in getI64VectorAttr()
122 return DenseIntElementsAttr::get( in getIndexVectorAttr()
127 DenseIntElementsAttr Builder::getI32TensorAttr(ArrayRef<int32_t> values) { in getI32TensorAttr()
128 return DenseIntElementsAttr::get( in getI32TensorAttr()
135 return DenseIntElementsAttr::get( in getI64TensorAttr()
[all …]
/llvm-project-15.0.7/mlir/lib/Interfaces/
H A DInferTypeOpInterface.cpp51 auto dattr = attr.cast<DenseIntElementsAttr>(); in getDims()
73 return attr.cast<DenseIntElementsAttr>() in getDimSize()
85 return attr.cast<DenseIntElementsAttr>().size(); in getRank()
96 auto dattr = attr.cast<DenseIntElementsAttr>(); in hasStaticShape()
113 auto dattr = attr.cast<DenseIntElementsAttr>(); in getNumElements()
155 DenseIntElementsAttr attr; in getValueAsShape()
H A DDataLayoutInterfaces.cpp107 entry.getValue().cast<DenseIntElementsAttr>().getValues<int32_t>(); in extractABIAlignment()
162 entry.getValue().cast<DenseIntElementsAttr>().getValues<int32_t>(); in extractPreferredAlignment()
501 auto value = entry.getValue().dyn_cast<DenseIntElementsAttr>(); in verifyDataLayoutSpec()
/llvm-project-15.0.7/mlir/include/mlir/IR/
H A DBuilders.h42 class DenseIntElementsAttr; variable
128 DenseIntElementsAttr getBoolVectorAttr(ArrayRef<bool> values);
129 DenseIntElementsAttr getI32VectorAttr(ArrayRef<int32_t> values);
130 DenseIntElementsAttr getI64VectorAttr(ArrayRef<int64_t> values);
131 DenseIntElementsAttr getIndexVectorAttr(ArrayRef<int64_t> values);
136 DenseIntElementsAttr getI32TensorAttr(ArrayRef<int32_t> values);
137 DenseIntElementsAttr getI64TensorAttr(ArrayRef<int64_t> values);
138 DenseIntElementsAttr getIndexTensorAttr(ArrayRef<int64_t> values);
H A DBuiltinAttributes.h21 class DenseIntElementsAttr; variable
909 class DenseIntElementsAttr : public DenseIntOrFPElementsAttr {
920 static DenseIntElementsAttr get(const ShapedType &type, Arg &&arg) {
922 .template cast<DenseIntElementsAttr>();
925 static DenseIntElementsAttr get(const ShapedType &type,
928 .template cast<DenseIntElementsAttr>();
/llvm-project-15.0.7/mlir/lib/Dialect/ControlFlow/IR/
H A DControlFlowOps.cpp457 DenseIntElementsAttr caseValues, in build()
468 DenseIntElementsAttr caseValuesAttr; in build()
472 caseValuesAttr = DenseIntElementsAttr::get(caseValueType, caseValues); in build()
482 DenseIntElementsAttr caseValuesAttr; in build()
486 caseValuesAttr = DenseIntElementsAttr::get(caseValueType, caseValues); in build()
498 DenseIntElementsAttr &caseValues, in parseSwitchOpCases()
541 caseValues = DenseIntElementsAttr::get(caseValueType, values); in parseSwitchOpCases()
549 DenseIntElementsAttr caseValues, SuccessorRange caseDestinations, in printSwitchOpCases()
599 Optional<DenseIntElementsAttr> caseValues = getCaseValues(); in getSuccessorForOperands()
809 Optional<DenseIntElementsAttr> predCaseValues = predSwitch.getCaseValues(); in simplifySwitchFromSwitchOnSameCondition()
/llvm-project-15.0.7/mlir/include/mlir/Bindings/Python/
H A DAttributes.td31 def : PythonAttr<"::mlir::DenseIntElementsAttr", "_ods_ir.DenseIntElementsAttr">;
/llvm-project-15.0.7/mlir/lib/Dialect/Shape/IR/
H A DShape.cpp57 DenseIntElementsAttr attr; in getShapeVec()
656 operands[0].cast<DenseIntElementsAttr>().getValues<int64_t>()); in fold()
658 operands[1].cast<DenseIntElementsAttr>().getValues<int64_t>()); in fold()
855 operands[0].cast<DenseIntElementsAttr>().getValues<int64_t>()); in fold()
857 operands[1].cast<DenseIntElementsAttr>().getValues<int64_t>()); in fold()
919 auto shape = attributes.getAs<DenseIntElementsAttr>("shape"); in inferReturnTypes()
961 if (!a || a.cast<DenseIntElementsAttr>().getNumElements() != 0) { in hasAtMostSingleNonScalar()
1342 auto shape = operands[0].dyn_cast_or_null<DenseIntElementsAttr>(); in fold()
1427 for (auto value : shape.cast<DenseIntElementsAttr>()) in fold()
1714 operands[0].cast<DenseIntElementsAttr>().getValues<int64_t>()); in fold()
[all …]
/llvm-project-15.0.7/mlir/test/python/ir/
H A Dattributes.py295 a = DenseIntElementsAttr(raw)
310 a = DenseIntElementsAttr(raw)
326 attr = DenseIntElementsAttr(Attribute.parse(attr_asm))
/llvm-project-15.0.7/flang/lib/Optimizer/Dialect/
H A DFIROps.cpp1502 mlir::DenseIntElementsAttr &coord) { in parseCustomRangeSubscript()
1548 mlir::DenseIntElementsAttr coorAttr = getCoor(); in verify()
2484 mlir::DenseIntElementsAttr ranges, in getSubOperands()
2501 targetOffsetAttr.getValue().cast<mlir::DenseIntElementsAttr>(), in getMutableSuccessorOperands()
2505 static unsigned denseElementsSize(mlir::DenseIntElementsAttr attr) { in denseElementsSize()
2528 auto segments = (*this)->getAttrOfType<mlir::DenseIntElementsAttr>( in getSuccessorOperands()
2537 auto segments = (*this)->getAttrOfType<mlir::DenseIntElementsAttr>( in getSuccessorOperands()
2553 auto a = (*this)->getAttrOfType<mlir::DenseIntElementsAttr>( in getCompareOperands()
2561 auto a = (*this)->getAttrOfType<mlir::DenseIntElementsAttr>( in getCompareOperands()
2563 auto segments = (*this)->getAttrOfType<mlir::DenseIntElementsAttr>( in getCompareOperands()
[all …]
/llvm-project-15.0.7/mlir/unittests/Dialect/Quant/
H A DQuantizationUtilsTest.cpp64 DenseIntElementsAttr::get(indicesType, {APInt(64, 0), APInt(64, 0)}); in getTestSparseElementsAttr()
113 EXPECT_TRUE(returnedValue.isa<DenseIntElementsAttr>()); in TEST()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DTargetAndABI.cpp130 .cast<DenseIntElementsAttr>()); in getEntryPointABIAttr()
146 DenseIntElementsAttr spirv::lookupLocalWorkGroupSize(Operation *op) { in lookupLocalWorkGroupSize()
/llvm-project-15.0.7/mlir/lib/Dialect/LLVMIR/IR/
H A DLLVMTypes.cpp243 return attr.cast<DenseIntElementsAttr>() in extractPointerSpecValue()
346 Attribute newSpec = newEntry.getValue().cast<DenseIntElementsAttr>(); in areCompatible()
361 auto values = entry.getValue().dyn_cast<DenseIntElementsAttr>(); in verifyEntries()
523 auto attr = currentEntry->getValue().cast<DenseIntElementsAttr>(); in getStructDataLayoutEntry()
571 return attr.cast<DenseIntElementsAttr>() in extractStructSpecValue()
605 auto values = entry.getValue().dyn_cast<DenseIntElementsAttr>(); in verifyEntries()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/SPIRV/IR/
H A DTargetAndABI.h99 DenseIntElementsAttr lookupLocalWorkGroupSize(Operation *op);
H A DSPIRVAttributes.td35 let parameters = (ins OptionalParameter<"DenseIntElementsAttr">:$local_size);
/llvm-project-15.0.7/mlir/unittests/IR/
H A DAttributeTest.cpp222 DenseIntElementsAttr::get(indicesType, {APInt(64, 0), APInt(64, 0)}); in TEST()
225 auto intValue = DenseIntElementsAttr::get(intValueTy, {1}); in TEST()
/llvm-project-15.0.7/mlir/lib/Dialect/Async/IR/
H A DAsync.cpp100 auto operandSegmentSizes = DenseIntElementsAttr::get( in build()
206 auto operandSegmentSizes = DenseIntElementsAttr::get( in parse()
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/Transforms/
H A DTosaFoldConstantTranspose.cpp40 DenseIntElementsAttr permAttr; in matchAndRewrite()
H A DTosaDecomposeTransposeConv.cpp198 DenseElementsAttr weightPaddingAttr = DenseIntElementsAttr::get( in matchAndRewrite()
261 DenseElementsAttr inputPaddingAttr = DenseIntElementsAttr::get( in matchAndRewrite()
/llvm-project-15.0.7/mlir/python/mlir/dialects/
H A D_ods_common.py85 segments = _cext.ir.DenseIntElementsAttr(raw_segments)
/llvm-project-15.0.7/mlir/lib/Dialect/Tosa/IR/
H A DTosaCanonicalizations.cpp138 DenseIntElementsAttr permAttr; in matchAndRewrite()
506 auto predicate = operands[0].dyn_cast_or_null<DenseIntElementsAttr>(); in fold()
538 operands[1].cast<DenseIntElementsAttr>().getValues<APInt>(), in fold()
/llvm-project-15.0.7/mlir/lib/Dialect/Quant/Utils/
H A DQuantizeUtils.cpp63 return DenseIntElementsAttr::get(newDenseType, quantValues); in convertDenseFPElementsAttr()
/llvm-project-15.0.7/mlir/lib/Conversion/TosaToLinalg/
H A DTosaToLinalgNamed.cpp234 auto weightPermAttr = DenseIntElementsAttr::get( in matchAndRewrite()
258 auto strideAttr = DenseIntElementsAttr::get( in matchAndRewrite()
260 auto dilationAttr = DenseIntElementsAttr::get( in matchAndRewrite()
411 auto strideAttr = DenseIntElementsAttr::get( in matchAndRewrite()
413 auto dilationAttr = DenseIntElementsAttr::get( in matchAndRewrite()
612 auto permutationAttr = DenseIntElementsAttr::get( in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Conversion/LinalgToSPIRV/
H A DLinalgToSPIRV.cpp122 DenseIntElementsAttr localSize = spirv::lookupLocalWorkGroupSize(genericOp); in matchAndRewrite()
/llvm-project-15.0.7/mlir/include/mlir/Interfaces/
H A DInferTypeOpInterface.h40 if (auto da = t.dyn_cast<DenseIntElementsAttr>()) in ShapeAdaptor()

123