[all-commits] [llvm/llvm-project] 8fd0bc: [mlir][spirv][memref] Calculate alignment for `Phy...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Thu Feb 1 15:33:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8fd0bce43c4c8334bcb31d214a32260914f59515
      https://github.com/llvm/llvm-project/commit/8fd0bce43c4c8334bcb31d214a32260914f59515
  Author: Jakub Kuderski <jakub at nod-labs.com>
  Date:   2024-02-01 (Thu, 01 Feb 2024)

  Changed paths:
    M mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
    M mlir/test/Conversion/MemRefToSPIRV/memref-to-spirv.mlir

  Log Message:
  -----------
  [mlir][spirv][memref] Calculate alignment for `PhysicalStorageBuffer`s (#80243)

The SPIR-V spec requires that memory accesses to
`PhysicalStorageBuffer`s are annotated with appropriate alignment
attributes [1]. Calculate these based on memref alignment attributes or
scalar type sizes.

[1] Otherwise spirv-val complains:
```
[VULKAN] ! Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: [VUID-StandaloneSpirv-PhysicalStorageBuffer64-04708] Memory accesses with PhysicalStorageBuffer must use Aligned.
  %48 = OpLoad %float %47
```




More information about the All-commits mailing list