[Mlir-commits] [mlir] [mlir] Fix MemRefType alignment in ConvertVectorToLLVM (PR #137389)

Lily Orth-Smith llvmlistbot at llvm.org
Mon Apr 28 09:17:22 PDT 2025


electriclilies wrote:

At the point in the stack we use these patterns, we've gotten rid of all non-statically shaped MemRefs. But I can see how this would be a problem for the generic use case.

I can't reveal too many details about our hardware, but most SIMD vectors in our hardware backend have a specific preferred alignment that we need to specify. For example, we had to set the preferred alignment of f16, f32, and n32 to the preferred alignment for their corresponding vector dtypes. So a portion of our data layout description looks like this, because the preferred alignments for vector types aren't being used

`f16:{vector_alignment}-f32:{vector_alignment}-n32:{vector_alignment}`. 

This isn't ideal because these alignments are also being used for scalar alignment. What we'd like is for our data layout description to look more like this: 

`f16:{f16_alignment}-f32:{f32_alignment}-n32:{n32_alignment}-v512:{vector_alignment}-v1024:{vector_alignment}-v2048:{vector_alignment}-v4096:{vector_alignment}-v8192`



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


More information about the Mlir-commits mailing list