%copy_empty = memref.alloc() : memref<3x0x1xf32>
// Copying an empty shape should do nothing (and should not crash).
memref.copy %input_empty, %copy_empty : memref<3x0x1xf32> to memref<3x0x1xf32>
-
+ memref.dealloc %copy_empty : memref<3x0x1xf32>
+ memref.dealloc %input_empty : memref<3x0x1xf32>
+ memref.dealloc %copy_two : memref<3x2xf32>
+ memref.dealloc %copy : memref<2x3xf32>
+ memref.dealloc %input : memref<2x3xf32>
return
}
call @cast_ranked_memref_to_dynamic_shape(%input) : (memref<2x3xf32>) -> ()
call @cast_unranked_memref_to_static_shape(%input) : (memref<2x3xf32>) -> ()
call @cast_unranked_memref_to_dynamic_shape(%input) : (memref<2x3xf32>) -> ()
+ memref.dealloc %input : memref<2x3xf32>
return
}
: (memref<2x3xf32>, memref<2xindex>) -> ()
call @reshape_unranked_memref_to_unranked(%input, %shape)
: (memref<2x3xf32>, memref<2xindex>) -> ()
+ memref.dealloc %input : memref<2x3xf32>
+ memref.dealloc %shape : memref<2xindex>
return
}
%U4 = memref.cast %I8 : memref<i8> to memref<*xi8>
call @print_memref_i8(%U4) : (memref<*xi8>) -> ()
+ memref.dealloc %U4 : memref<*xi8>
memref.dealloc %A : memref<10x3xf32, 0>
call @return_var_memref_caller() : () -> ()
func private @printNewline() -> ()
func @dim_op_of_unranked() {
- %ranked = memref.alloc() : memref<4x3xf32>
+ %ranked = memref.alloca() : memref<4x3xf32>
%unranked = memref.cast %ranked: memref<4x3xf32> to memref<*xf32>
%c0 = constant 0 : index