[Mlir-commits] [mlir] [mlir][vector][spirv] Lower vector.maskedload and vector.maskedstore to SPIR-V (PR #74834)

Hsiangkai Wang llvmlistbot at llvm.org
Mon Dec 11 02:19:57 PST 2023


Hsiangkai wrote:

> Hi @Hsiangkai,
> 
> This looks very useful but I wonder if we should perform the expansion at the level of the vector dialect instead, like we do with ops like `vector.gather`: https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Vector/Transforms/LowerVectorGather.cpp.
> 
> I know we had the same discussion under another PR recently: [#69708 (comment)](https://github.com/llvm/llvm-project/pull/69708#issuecomment-1793796731), so I wonder if you found staying at the level of the vector dialect problematic for some reason.

I convert vector.transfer_read into vector.load or vector.maskedload depending on the in_bound and mask of vector.transfer_read operator. I already have #71674 to convert vector.load to spirv.load. My goal is to convert all the dialects into spirv dialect in some stage. What is the rational way to lower vector.maskedload to spirv.load?

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


More information about the Mlir-commits mailing list