[PATCH] D76241: [mlir][spirv] Use memref memory space for storage class

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 11:27:55 PDT 2020


antiagainst created this revision.
antiagainst added a reviewer: denis13.
Herald added subscribers: llvm-commits, bader, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, shauheen, burmako, jpienaar, rriddle, mehdi_amini, jfb.
Herald added a reviewer: mravishankar.
Herald added a reviewer: herhut.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.

Previously in SPIRVTypeConverter, we always convert memref types
to StorageBuffer regardless of their memory spaces. This commit
fixes that to let the conversion to look into memory space
properly. For this purpose, a mapping between SPIR-V storage class
and memref memory space is introduced. The mapping is arbitary
decided at the moment and the hope is that we can leverage
string memory space later to be more clear.

Now spv.interface_var_abi cannot contain storage class unless it's
attached to a scalar value, where we need the storage class as side
channel information. Verifications and tests are properly adjusted.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76241

Files:
  mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
  mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
  mlir/include/mlir/Dialect/SPIRV/TargetAndABI.td
  mlir/include/mlir/IR/Types.h
  mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
  mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
  mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
  mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
  mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
  mlir/lib/IR/StandardTypes.cpp
  mlir/test/Conversion/GPUToSPIRV/load-store.mlir
  mlir/test/Conversion/GPUToSPIRV/simple.mlir
  mlir/test/Conversion/StandardToSPIRV/std-to-spirv.mlir
  mlir/test/Dialect/SPIRV/Transforms/abi-interface.mlir
  mlir/test/Dialect/SPIRV/Transforms/abi-load-store.mlir
  mlir/test/Dialect/SPIRV/Transforms/abi-simple.mlir
  mlir/test/Dialect/SPIRV/target-and-abi.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76241.250602.patch
Type: text/x-patch
Size: 28788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/9dbbe402/attachment.bin>


More information about the llvm-commits mailing list