Skip to content

Commit b6c8854

Browse files
author
Nicolas Vasilache
committed
[mlir] Fix spurious f64 -> f16 change in CPU runner test
1 parent cb5724c commit b6c8854

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

mlir/test/mlir-cpu-runner/sgemm_naive_codegen.mlir

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ func @main() {
1212

1313
%reps = constant 1 : index
1414

15-
%t_start = call @rtclock() : () -> f16
15+
%t_start = call @rtclock() : () -> f64
1616
affine.for %arg0 = 0 to 5 {
1717
linalg.fill(%C, %cf1) : memref<16x16xf32>, f32
1818
call @sgemm_naive(%A, %B, %C) : (memref<16x16xf32>, memref<16x16xf32>, memref<16x16xf32>) -> ()
1919
}
20-
%t_end = call @rtclock() : () -> f16
21-
%t = subf %t_end, %t_start : f16
20+
%t_end = call @rtclock() : () -> f64
21+
%t = subf %t_end, %t_start : f64
2222

2323
%pC = memref_cast %C : memref<16x16xf32> to memref<*xf32>
2424
call @print_memref_f32(%pC) : (memref<*xf32>) -> ()
@@ -35,9 +35,9 @@ func @main() {
3535
%f3 = muli %c2, %f2 : index
3636
%num_flops = muli %reps, %f3 : index
3737
%num_flops_i = index_cast %num_flops : index to i16
38-
%num_flops_f = sitofp %num_flops_i : i16 to f16
39-
%flops = divf %num_flops_f, %t : f16
40-
call @print_flops(%flops) : (f16) -> ()
38+
%num_flops_f = sitofp %num_flops_i : i16 to f64
39+
%flops = divf %num_flops_f, %t : f64
40+
call @print_flops(%flops) : (f64) -> ()
4141

4242
return
4343
}
@@ -66,6 +66,6 @@ func @sgemm_naive(%arg0: memref<16x16xf32>, %arg1: memref<16x16xf32>, %arg2: mem
6666
return
6767
}
6868

69-
func @print_flops(f16)
70-
func @rtclock() -> f16
69+
func @print_flops(f64)
70+
func @rtclock() -> f64
7171
func @print_memref_f32(memref<*xf32>)

0 commit comments

Comments
 (0)