I am trying to optimise my GPU memory usage for my python program and on task manager I can see that it stays low for a while, and then at a certain point it shoots upwards. I am not sure at what point in the program this is though, so I was wondering if there was a way to print it to the screen while the program is running to help me locate the cause of the sudden increase?
As you can see from the screenshot, my memory and CPU usage go up at around the same time too, so any commments on how to print those would be appreciated even if the former is not possible.