Compute minimum peak

1. apply pseudo code
2. create compute_map and node_mem in new method
@nouiz 
I think at this place, use idx in dmap or vmap is used to track the memory is saved_by_inplace or saved_by_view. so maybe we dont need to use that check again?