I need to measure neural network inference times for a project. I want my results presented to be aligned with the standard practices for measuring this in academic papers.
What I have managed to figure out is that we first want to warm up the GPU with a few inferences before the timing, and I need to use the torch provided timing feature (instead of Python's time.time()).
My questions are as follows:
- Is it standard to time with a batch size of 1, or with the best batch size for that hardware?
- Am I only timing the neural network inference, or am I also timing the moving of data to the GPU, as well as data transformations that precede inference?
- How many iterations would be reasonable to time to get a good average inference time?
Any advice would be greatly appreciated. Thank you.