Home
last modified time | relevance | path

Searched refs:constantOp (Results 1 – 13 of 13) sorted by relevance

/llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/
H A DBufferUtils.cpp149 bufferization::getGlobalFor(arith::ConstantOp constantOp, uint64_t alignment) { in getGlobalFor() argument
150 auto type = constantOp.getType().cast<RankedTensorType>(); in getGlobalFor()
151 auto moduleOp = constantOp->getParentOfType<ModuleOp>(); in getGlobalFor()
165 if (opAlignment == alignment && initialValue == constantOp.getValue()) in getGlobalFor()
187 constantOp.getLoc(), (Twine("__constant_") + os.str()).str(), in getGlobalFor()
190 /*initial_value=*/constantOp.getValue().cast<ElementsAttr>(), in getGlobalFor()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/Transforms/
H A DBufferizableOpInterfaceImpl.cpp27 auto constantOp = cast<arith::ConstantOp>(op); in bufferize() local
35 if (!constantOp.getType().isa<RankedTensorType>()) in bufferize()
39 auto moduleOp = constantOp->getParentOfType<ModuleOp>(); in bufferize()
46 getGlobalFor(constantOp, options.bufferAlignment); in bufferize()
/llvm-project-15.0.7/mlir/lib/Target/Cpp/
H A DTranslateToCpp.cpp218 emitc::ConstantOp constantOp) { in printOperation() argument
219 Operation *operation = constantOp.getOperation(); in printOperation()
220 Attribute value = constantOp.getValue(); in printOperation()
234 arith::ConstantOp constantOp) { in printOperation() argument
235 Operation *operation = constantOp.getOperation(); in printOperation()
236 Attribute value = constantOp.getValue(); in printOperation()
242 func::ConstantOp constantOp) { in printOperation() argument
243 Operation *operation = constantOp.getOperation(); in printOperation()
244 Attribute value = constantOp.getValueAttr(); in printOperation()
/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/Transforms/
H A DSplitReduction.cpp186 Value constantOp = b.create<arith::ConstantOp>(loc, identity); in splitReduction() local
188 b.create<linalg::FillOp>(op->getLoc(), constantOp, initOrAllocTensor) in splitReduction()
349 Value constantOp = b.create<arith::ConstantOp>(loc, std::get<1>(it)); in splitReductionByScaling() local
351 b.create<linalg::FillOp>(op->getLoc(), constantOp, initOrAllocTensor)); in splitReductionByScaling()
H A DVectorization.cpp282 auto constantOp = in vectorizeLinalgIndex() local
288 return VectorizationResult{VectorizationStatus::NewOp, constantOp}; in vectorizeLinalgIndex()
294 loc, VectorType::get(targetShape, b.getIndexType()), constantOp); in vectorizeLinalgIndex()
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Bufferization/Transforms/
H A DBufferUtils.h127 FailureOr<memref::GlobalOp> getGlobalFor(arith::ConstantOp constantOp,
/llvm-project-15.0.7/mlir/lib/Conversion/VectorToGPU/
H A DVectorToGPU.cpp155 static bool constantSupportsMMAMatrixType(arith::ConstantOp constantOp) { in constantSupportsMMAMatrixType() argument
156 auto vecType = constantOp.getType().dyn_cast<VectorType>(); in constantSupportsMMAMatrixType()
159 return constantOp.getValue().isa<SplatElementsAttr>(); in constantSupportsMMAMatrixType()
830 } else if (auto constantOp = dyn_cast<arith::ConstantOp>(op)) { in convertVectorToMMAOps() local
831 convertConstantOp(constantOp, valueMapping); in convertVectorToMMAOps()
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/
H A DVectorDistribute.cpp549 auto constantOp = yieldOperand->get().getDefiningOp<arith::ConstantOp>(); in matchAndRewrite() local
550 auto dense = constantOp.getValue().dyn_cast<SplatElementsAttr>(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/IR/
H A DVectorOps.cpp1570 auto constantOp = extractOp.getVector().getDefiningOp<arith::ConstantOp>(); in matchAndRewrite() local
1571 if (!constantOp) in matchAndRewrite()
1573 auto dense = constantOp.getValue().dyn_cast<SplatElementsAttr>(); in matchAndRewrite()
2679 auto constantOp = in matchAndRewrite() local
2681 if (!constantOp) in matchAndRewrite()
2683 auto dense = constantOp.getValue().dyn_cast<SplatElementsAttr>(); in matchAndRewrite()
4367 auto constantOp = in matchAndRewrite() local
4369 if (!constantOp) in matchAndRewrite()
4372 auto dense = constantOp.getValue().dyn_cast<SplatElementsAttr>(); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/Shape/IR/
H A DShape.cpp1240 if (auto constantOp = getDim().getDefiningOp<arith::ConstantOp>()) in getConstantDim() local
1241 return constantOp.getValue().cast<IntegerAttr>().getInt(); in getConstantDim()
/llvm-project-15.0.7/mlir/lib/Dialect/Tensor/IR/
H A DTensorOps.cpp300 if (auto constantOp = getIndex().getDefiningOp<arith::ConstantOp>()) in getConstantIndex() local
301 return constantOp.getValue().cast<IntegerAttr>().getInt(); in getConstantIndex()
/llvm-project-15.0.7/mlir/lib/Conversion/MemRefToLLVM/
H A DMemRefToLLVM.cpp412 if (auto constantOp = dimOp.getIndex().getDefiningOp<LLVM::ConstantOp>()) in getConstantDimIndex() local
413 return constantOp.getValue() in getConstantDimIndex()
/llvm-project-15.0.7/mlir/lib/Dialect/MemRef/IR/
H A DMemRefOps.cpp753 if (auto constantOp = getIndex().getDefiningOp<arith::ConstantOp>()) in getConstantIndex() local
754 return constantOp.getValue().cast<IntegerAttr>().getInt(); in getConstantIndex()