File tree 4 files changed +10
-2
lines changed
mlir/test/mlir-cpu-runner
4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ func @main() -> () {
49
49
%copy_empty = memref.alloc () : memref <3 x0 x1 xf32 >
50
50
// Copying an empty shape should do nothing (and should not crash).
51
51
memref.copy %input_empty , %copy_empty : memref <3 x0 x1 xf32 > to memref <3 x0 x1 xf32 >
52
-
52
+ memref.dealloc %copy_empty : memref <3 x0 x1 xf32 >
53
+ memref.dealloc %input_empty : memref <3 x0 x1 xf32 >
54
+ memref.dealloc %copy_two : memref <3 x2 xf32 >
55
+ memref.dealloc %copy : memref <2 x3 xf32 >
56
+ memref.dealloc %input : memref <2 x3 xf32 >
53
57
return
54
58
}
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ func @main() -> () {
31
31
call @cast_ranked_memref_to_dynamic_shape (%input ) : (memref <2 x3 xf32 >) -> ()
32
32
call @cast_unranked_memref_to_static_shape (%input ) : (memref <2 x3 xf32 >) -> ()
33
33
call @cast_unranked_memref_to_dynamic_shape (%input ) : (memref <2 x3 xf32 >) -> ()
34
+ memref.dealloc %input : memref <2 x3 xf32 >
34
35
return
35
36
}
36
37
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ func @main() -> () {
43
43
: (memref <2 x3 xf32 >, memref <2 xindex >) -> ()
44
44
call @reshape_unranked_memref_to_unranked (%input , %shape )
45
45
: (memref <2 x3 xf32 >, memref <2 xindex >) -> ()
46
+ memref.dealloc %input : memref <2 x3 xf32 >
47
+ memref.dealloc %shape : memref <2 xindex >
46
48
return
47
49
}
48
50
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ func @main() -> () {
69
69
%U4 = memref.cast %I8 : memref <i8 > to memref <*xi8 >
70
70
call @print_memref_i8 (%U4 ) : (memref <*xi8 >) -> ()
71
71
72
+ memref.dealloc %U4 : memref <*xi8 >
72
73
memref.dealloc %A : memref <10 x3 xf32 , 0 >
73
74
74
75
call @return_var_memref_caller () : () -> ()
@@ -113,7 +114,7 @@ func private @printU64(index) -> ()
113
114
func private @printNewline () -> ()
114
115
115
116
func @dim_op_of_unranked () {
116
- %ranked = memref.alloc () : memref <4 x3 xf32 >
117
+ %ranked = memref.alloca () : memref <4 x3 xf32 >
117
118
%unranked = memref.cast %ranked: memref <4 x3 xf32 > to memref <*xf32 >
118
119
119
120
%c0 = constant 0 : index
You can’t perform that action at this time.
0 commit comments