[Mlir-commits] [mlir] [mlir][memref][spirv] Add SPIR-V Image Lowering (PR #150978)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jul 29 06:34:42 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp b/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
index b9ff53818..24694333e 100644
--- a/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
+++ b/mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
@@ -717,7 +717,7 @@ ImageLoadOpPattern::matchAndRewrite(memref::LoadOp loadOp, OpAdaptor adaptor,
   // instead or texels need to be accessed via atomics through a texel pointer.
   // Future work will generalize support to plain images.
   auto convertedPointeeType = cast<spirv::PointerType>(
-                    getTypeConverter()->convertType(loadOp.getMemRefType()));
+      getTypeConverter()->convertType(loadOp.getMemRefType()));
   if (!isa<spirv::SampledImageType>(convertedPointeeType.getPointeeType()))
     return rewriter.notifyMatchFailure(loadOp,
                                        "cannot lower memrefs which do not "

``````````

</details>


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


More information about the Mlir-commits mailing list