Cuda out of memory despite consuming only 60% memory

Here is an example of what I had in mind.