Skip to content

Commit 058d183

Browse files
authored
[mlir][spirv] Make ConvertToSPIRVPass into a test pass (non-public) (llvm#124301)
With the removal of mlir-vulkan-runner (as part of llvm#73457) in e7e3c45, this pass no longer has to be public (previously it had to be so the runner could use it). This commit makes it instead only available for use by mlir-opt.
1 parent 86e20b0 commit 058d183

File tree

21 files changed

+74
-116
lines changed

21 files changed

+74
-116
lines changed

mlir/include/mlir/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

mlir/include/mlir/Conversion/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.h"
3131
#include "mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRVPass.h"
3232
#include "mlir/Conversion/ConvertToLLVM/ToLLVMPass.h"
33-
#include "mlir/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.h"
3433
#include "mlir/Conversion/FuncToEmitC/FuncToEmitCPass.h"
3534
#include "mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h"
3635
#include "mlir/Conversion/FuncToSPIRV/FuncToSPIRVPass.h"

mlir/include/mlir/Conversion/Passes.td

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,6 @@ def ConvertToLLVMPass : Pass<"convert-to-llvm"> {
3939
];
4040
}
4141

42-
//===----------------------------------------------------------------------===//
43-
// ToSPIRV
44-
//===----------------------------------------------------------------------===//
45-
46-
def ConvertToSPIRVPass : Pass<"convert-to-spirv"> {
47-
let summary = "Convert to SPIR-V";
48-
let description = [{
49-
This is a generic pass to convert to SPIR-V.
50-
}];
51-
let dependentDialects = [
52-
"spirv::SPIRVDialect",
53-
"vector::VectorDialect",
54-
];
55-
let options = [
56-
Option<"runSignatureConversion", "run-signature-conversion", "bool",
57-
/*default=*/"true",
58-
"Run function signature conversion to convert vector types">,
59-
Option<"runVectorUnrolling", "run-vector-unrolling", "bool",
60-
/*default=*/"true",
61-
"Run vector unrolling to convert vector types in function bodies">,
62-
Option<"convertGPUModules", "convert-gpu-modules", "bool",
63-
/*default=*/"false",
64-
"Clone and convert GPU modules">,
65-
Option<"nestInGPUModule", "nest-in-gpu-module", "bool",
66-
/*default=*/"false",
67-
"Put converted SPIR-V module inside the gpu.module instead of alongside it.">,
68-
];
69-
}
70-
7142
//===----------------------------------------------------------------------===//
7243
// AffineToStandard
7344
//===----------------------------------------------------------------------===//

mlir/lib/Conversion/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ add_subdirectory(ControlFlowToLLVM)
1919
add_subdirectory(ControlFlowToSCF)
2020
add_subdirectory(ControlFlowToSPIRV)
2121
add_subdirectory(ConvertToLLVM)
22-
add_subdirectory(ConvertToSPIRV)
2322
add_subdirectory(FuncToEmitC)
2423
add_subdirectory(FuncToLLVM)
2524
add_subdirectory(FuncToSPIRV)

mlir/lib/Conversion/ConvertToSPIRV/CMakeLists.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

mlir/test/Conversion/ConvertToSPIRV/argmax-kernel.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-to-spirv -cse %s | FileCheck %s
1+
// RUN: mlir-opt -test-convert-to-spirv -cse %s | FileCheck %s
22

33
module attributes {
44
gpu.container_module,

mlir/test/Conversion/ConvertToSPIRV/arith.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -test-convert-to-spirv="run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
22

33
//===----------------------------------------------------------------------===//
44
// arithmetic ops

mlir/test/Conversion/ConvertToSPIRV/combined.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -test-convert-to-spirv="run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
22

33
// CHECK-LABEL: @combined
44
// CHECK: %[[C0_F32:.*]] = spirv.Constant 0.000000e+00 : f32

mlir/test/Conversion/ConvertToSPIRV/convert-gpu-modules-nested.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-to-spirv="convert-gpu-modules=true nest-in-gpu-module=true run-signature-conversion=false run-vector-unrolling=false" %s | FileCheck %s
1+
// RUN: mlir-opt -test-convert-to-spirv="convert-gpu-modules=true nest-in-gpu-module=true run-signature-conversion=false run-vector-unrolling=false" %s | FileCheck %s
22

33
module attributes {
44
gpu.container_module,

mlir/test/Conversion/ConvertToSPIRV/convert-gpu-modules.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -convert-to-spirv="convert-gpu-modules=true run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -test-convert-to-spirv="convert-gpu-modules=true run-signature-conversion=false run-vector-unrolling=false" -split-input-file %s | FileCheck %s
22

33
module attributes {
44
gpu.container_module,

0 commit comments

Comments
 (0)