amber icon indicating copy to clipboard operation
amber copied to clipboard

Add pipeline runtime measurement

Open s-perron opened this issue 6 years ago • 5 comments

Add a feature that will run a pipeline and report the amount of time that it took to run. Since the times will be relatively small, the pipeline should be run many times and the average time reported.

This will be useful for reporting and reproducing performance problems. It would also be a good tool for testing how small changes to a shader effect the performance of the shader.

s-perron avatar Sep 06 '19 13:09 s-perron

Does --log-graphics-calls-time do part of what you want? Or is it to low level?

dj2 avatar Sep 06 '19 14:09 dj2

For a compute pipeline, the call to vkQueueSubmit is done asynchronously. It returns before the actual pipeline is run. The time for that call is not meaningful. If a call to vkQueueWaitIdle is done immediately afterward is could be, but it would include all of the overhead, and would miss a time before that call was made.

I would be looking for something that puts a vkCmdWriteTimestamp command before and after the vkCmdDispatch command in the command buffer. Then it can return the difference in the two times. This would isolate the time to actually run the pipeline.

s-perron avatar Sep 06 '19 14:09 s-perron

Ok, so you're looking for something compute specific? I wonder if wrapping something similar for graphics would be useful for the graphicsfuzz folks @afd @paulthomson ?

dj2 avatar Sep 06 '19 14:09 dj2

I would like graphics and compute, I was just using compute as an example.

s-perron avatar Sep 06 '19 14:09 s-perron

ClusterFuzz->GraphicsFuzz -- because I don't want to unfairly take credit for ClusterFuzz :-)

I don't think we have an immediate need for this, but it sounds like a good idea and could be useful at some point. We plan to manually REPEAT a "DRAW_RECT" and add commands to check that the framebuffer does not change, but we won't be measuring performance for now.

paulthomson avatar Sep 09 '19 10:09 paulthomson