Skip to content

Commit 99fc708

Browse files
committed
Code refactoring and formatting
1 parent c640e20 commit 99fc708

File tree

11 files changed

+220
-244
lines changed

11 files changed

+220
-244
lines changed

mlir/include/mlir/Conversion/Passes.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def ConvertToSPIRVPass : Pass<"convert-to-spirv"> {
4646
];
4747
let options = [
4848
Option<"runSignatureConversion", "run-signature-conversion", "bool",
49-
/*default=*/"false",
49+
/*default=*/"true",
5050
"Run function signature conversion to convert vector types">
5151
];
5252
}

mlir/lib/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ using namespace mlir;
3737
namespace {
3838

3939
/// A pass to perform the SPIR-V conversion.
40-
class ConvertToSPIRVPass
40+
struct ConvertToSPIRVPass
4141
: public impl::ConvertToSPIRVPassBase<ConvertToSPIRVPass> {
42-
using impl::ConvertToSPIRVPassBase<
43-
ConvertToSPIRVPass>::ConvertToSPIRVPassBase;
42+
using ConvertToSPIRVPassBase::ConvertToSPIRVPassBase;
4443

4544
void runOnOperation() override {
4645
MLIRContext *context = &getContext();

mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp

Lines changed: 209 additions & 232 deletions
Large diffs are not rendered by default.

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 -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=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 %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false" %s | FileCheck %s
22

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

mlir/test/Conversion/ConvertToSPIRV/func-signature-vector-unroll.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" -split-input-file %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv -split-input-file %s | FileCheck %s
22

33
// CHECK-LABEL: @simple_scalar
44
// CHECK-SAME: (%[[ARG0:.+]]: i32)

mlir/test/Conversion/ConvertToSPIRV/index.mlir

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

33
// CHECK-LABEL: @basic
44
func.func @basic(%a: index, %b: index) {

mlir/test/Conversion/ConvertToSPIRV/scf.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 %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false" %s | FileCheck %s
22

33
// CHECK-LABEL: @if_yield
44
// CHECK: %[[VAR:.*]] = spirv.Variable : !spirv.ptr<f32, Function>

mlir/test/Conversion/ConvertToSPIRV/simple.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 %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false" %s | FileCheck %s
22

33
// CHECK-LABEL: @return_scalar
44
// CHECK-SAME: %[[ARG0:.*]]: i32

mlir/test/Conversion/ConvertToSPIRV/ub.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 %s | FileCheck %s
1+
// RUN: mlir-opt -convert-to-spirv="run-signature-conversion=false" %s | FileCheck %s
22

33
// CHECK-LABEL: @ub
44
// CHECK: %[[UNDEF:.*]] = spirv.Undef : i32

mlir/test/Conversion/ConvertToSPIRV/vector.mlir

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

33
// CHECK-LABEL: @extract
44
// CHECK-SAME: %[[ARG:.+]]: vector<2xf32>

0 commit comments

Comments
 (0)