[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)

Mehdi Amini llvmlistbot at llvm.org
Tue May 14 13:36:41 PDT 2024


================
@@ -111,6 +113,15 @@ struct RawBufferOpLowering : public ConvertOpToLLVMPattern<GpuOp> {
     if (auto dataVector = dyn_cast<VectorType>(wantedDataType)) {
       uint32_t elemBits = dataVector.getElementTypeBitWidth();
       uint32_t totalBits = elemBits * dataVector.getNumElements();
+      uint32_t maxVectorOpWidth = 128; // default value
+      if (std::optional<uint32_t> v =
+              DataLayout(gpuOp->template getParentOfType<mlir::ModuleOp>())
----------------
joker-eph wrote:

Is this safe to always assume there is a containing ModuleOp?  Seems to me that this could be a GPUModuleOp for example.


https://github.com/llvm/llvm-project/pull/92138


More information about the Mlir-commits mailing list