[Mlir-commits] [mlir] [mlir][spirv] Add a generic `convert-to-spirv` pass (PR #95942)

Jakub Kuderski llvmlistbot at llvm.org
Thu Aug 29 12:59:11 PDT 2024


================
@@ -31,6 +31,18 @@ def ConvertToLLVMPass : Pass<"convert-to-llvm"> {
   ];
 }
 
+//===----------------------------------------------------------------------===//
+// ToSPIRV
+//===----------------------------------------------------------------------===//
+
+def ConvertToSPIRVPass : Pass<"convert-to-spirv"> {
+  let summary = "Convert to SPIR-V";
+  let description = [{
+    This is a generic pass to convert to SPIR-V.
----------------
kuhar wrote:

The tool/binary should be retired and removed, by we want the functionality to be moved over to the (unified) mlir runner. Of course we don't want to just copy paste the code, but the dependency on the spirv conversion code will have to move over there in some form.

What you see across this is and following is incremental improvements towards having a cleaner lowering story for spirv upstream, but this is not the end state. Before the convert to spirv pass, we relied on the gpu to spirv pass which just added a bunch of random patterns to make the vulkan runner work. We are untangling all of this piece by piece.

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


More information about the Mlir-commits mailing list