Skip to content

Commit

Permalink
CI: add end of file and end of line pre-commit hooks (#3053)
Browse files Browse the repository at this point in the history
No more manual "please add end of line break" in PRs!
  • Loading branch information
superlopuh authored Aug 18, 2024
1 parent 5b7bba4 commit 4fbc204
Show file tree
Hide file tree
Showing 20 changed files with 2 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ repos:
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.0
hooks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ builtin.module {
// CHECK-NEXT: riscv_func.return %11 : !riscv.reg<t0>
// CHECK-NEXT: }
// CHECK-NEXT: }

Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@
// tests with fastmath flags when set to "contract"
// CHECK-NEXT: %addf64_fm_contract = riscv.fadd.d %l, %r fastmath<contract> : (!riscv.freg, !riscv.freg) -> !riscv.freg
%addf64_fm_contract = arith.addf %lhsvf64, %rhsvf64 fastmath<contract> : vector<1xf64>

2 changes: 0 additions & 2 deletions tests/filecheck/dialects/accfg/accfg_ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,3 @@ func.func @test() {
// CHECK-GENERIC-NEXT: "func.return"() : () -> ()
// CHECK-GENERIC-NEXT: }) : () -> ()
// CHECK-GENERIC-NEXT: }) : () -> ()


1 change: 0 additions & 1 deletion tests/filecheck/dialects/memref_stream/canonicalize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,3 @@ func.func @interleaved_no_init(%A0 : memref<3x5xf64>, %B0 : memref<5x8xf64>, %C0
}
func.return %C0 : memref<3x8xf64>
}

1 change: 0 additions & 1 deletion tests/filecheck/dialects/quantum/attrs.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@
"test.op"() {"angle" = !quantum.angle<-pi>} : () -> ()

// CHECK-NEXT: "test.op"() {"angle" = !quantum.angle<pi>} : () -> ()

1 change: 0 additions & 1 deletion tests/filecheck/dialects/riscv_scf/loop_range_folding.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,3 @@ riscv_scf.for %2 : !riscv.reg = %lb to %ub step %step {
// CHECK-NEXT: "test.op"(%{{.*}}, %{{.*}}) : (!riscv.reg, !riscv.reg) -> ()
// CHECK-NEXT: }
// CHECK-NEXT: }

2 changes: 0 additions & 2 deletions tests/filecheck/dialects/riscv_snitch/ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,3 @@ riscv_func.func @simd() {
// CHECK-GENERIC-NEXT: "riscv_func.return"() : () -> ()
// CHECK-GENERIC-NEXT: }) {"sym_name" = "simd", "function_type" = () -> ()} : () -> ()
// CHECK-GENERIC-NEXT: }) : () -> ()


1 change: 0 additions & 1 deletion tests/filecheck/dialects/riscv_snitch/verification.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@
}) {"stagger_mask" = #builtin.int<0>, "stagger_count" = #builtin.int<0>} : (!riscv.reg<a0>, !riscv.freg<fa0>) -> !riscv.freg<fa0>

// CHECK: Operation does not verify: Expected !riscv.freg<fa0>, got !riscv.freg<fa1>. The riscv_snitch.frep's riscv_snitch.frep_yield must match carriedvariables types.

Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@
// CHECK-NEXT: "snitch.ssr_disable"() : () -> ()

// CHECK-NEXT: }

2 changes: 0 additions & 2 deletions tests/filecheck/dialects/tensor/ops.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@
// CHECK-GENERIC-NEXT: %cast1 = "tensor.cast"(%tensor) : (tensor<?x?xf32>) -> tensor<4x4xf32>
// CHECK-GENERIC-NEXT: %cast2 = "tensor.cast"(%tensor) {"hello" = "world"} : (tensor<?x?xf32>) -> tensor<4x4xf32>
// CHECK-GENERIC-NEXT: }) : () -> ()


Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,3 @@ builtin.module {
%res_transpose = "linalg.broadcast"(%0, %1) {"dimensions" = array<i64: 1>} : (tensor<3x4x5xf32>, tensor<4x5x6x2xf32>) -> tensor<4x5x6x2xf32>

}







Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ linalg.matmul {id} ins(%18, %19 : memref<64x9216xf32>, memref<9216x4096xf32>) ou
// CHECK-NEXT: %19 = "test.op"() : () -> tensor<64x4096xi32>
// CHECK-NEXT: %20 = linalg.quantized_matmul ins(%18#0, %18#1, %c0_i32, %c0_i32_0 : tensor<64x9216xi8>, tensor<9216x4096xi8>, i32, i32) outs(%19 : tensor<64x4096xi32>) -> tensor<64x4096xi32>
// CHECK-NEXT: }

Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ riscv.assembly_section ".text" {
// CHECK-NEXT: riscv_func.return
// CHECK-NEXT: }
// CHECK-NEXT: }

2 changes: 0 additions & 2 deletions tests/filecheck/transforms/arith-add-immediate-zero.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ func.func @hello(%n : i32) -> i32 {
// CHECK-NEXT: func.return %n : i32
// CHECK-NEXT: }
// CHECK-NEXT: }


Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ builtin.module {
// CHECK-NEXT: func.return %n : i32
// CHECK-NEXT: }
// CHECK-NEXT: }

3 changes: 0 additions & 3 deletions tests/filecheck/transforms/convert_onnx_to_linalg.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,3 @@
// CHECK-NEXT: ml_program.global private @onnx_constant_2(dense<2.000000e+00> : tensor<1x5xf32>) : tensor<1x5xf32>

// CHECK-NEXT: }



1 change: 0 additions & 1 deletion tests/filecheck/transforms/convert_qref_to_qssa.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ qref.cnot %q0, %q1
// CHECK-ROUNDTRIP-NEXT: qref.cnot %q0, %q1
// CHECK-ROUNDTRIP-NEXT: %0 = qref.measure %q0
// CHECK-ROUNDTRIP-NEXT: }

1 change: 0 additions & 1 deletion tests/filecheck/transforms/convert_qssa_to_qref.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@
// CHECK-ROUNDTRIP-NEXT: %q0_2, %q1_2 = qssa.cnot %q0_1, %q1_1
// CHECK-ROUNDTRIP-NEXT: %0 = qssa.measure %q0_2
// CHECK-ROUNDTRIP-NEXT: }

1 change: 0 additions & 1 deletion xdsl/dialects/cmath.irdl
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ builtin.module {
}
}
}

0 comments on commit 4fbc204

Please sign in to comment.