File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
mlir/test/mlir-cpu-runner Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,10 @@ func @main() -> () {
4949 %copy_empty = memref.alloc () : memref <3 x0 x1 xf32 >
5050 // Copying an empty shape should do nothing (and should not crash).
5151 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 >
5357 return
5458}
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ func @main() -> () {
3131 call @cast_ranked_memref_to_dynamic_shape (%input ) : (memref <2 x3 xf32 >) -> ()
3232 call @cast_unranked_memref_to_static_shape (%input ) : (memref <2 x3 xf32 >) -> ()
3333 call @cast_unranked_memref_to_dynamic_shape (%input ) : (memref <2 x3 xf32 >) -> ()
34+ memref.dealloc %input : memref <2 x3 xf32 >
3435 return
3536}
3637
Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ func @main() -> () {
4343 : (memref <2 x3 xf32 >, memref <2 xindex >) -> ()
4444 call @reshape_unranked_memref_to_unranked (%input , %shape )
4545 : (memref <2 x3 xf32 >, memref <2 xindex >) -> ()
46+ memref.dealloc %input : memref <2 x3 xf32 >
47+ memref.dealloc %shape : memref <2 xindex >
4648 return
4749}
4850
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ func @main() -> () {
6969 %U4 = memref.cast %I8 : memref <i8 > to memref <*xi8 >
7070 call @print_memref_i8 (%U4 ) : (memref <*xi8 >) -> ()
7171
72+ memref.dealloc %U4 : memref <*xi8 >
7273 memref.dealloc %A : memref <10 x3 xf32 , 0 >
7374
7475 call @return_var_memref_caller () : () -> ()
@@ -113,7 +114,7 @@ func private @printU64(index) -> ()
113114func private @printNewline () -> ()
114115
115116func @dim_op_of_unranked () {
116- %ranked = memref.alloc () : memref <4 x3 xf32 >
117+ %ranked = memref.alloca () : memref <4 x3 xf32 >
117118 %unranked = memref.cast %ranked: memref <4 x3 xf32 > to memref <*xf32 >
118119
119120 %c0 = constant 0 : index
You can’t perform that action at this time.
0 commit comments