Are ethere any way in WebGPU to measure the execution time of a specific compute pass in a multi-pass pipeline?
I'm expecting to find and objective way to benchmark various compute pass in order to find whitch step is slowing down the pipeline.
Are ethere any way in WebGPU to measure the execution time of a specific compute pass in a multi-pass pipeline?
I'm expecting to find and objective way to benchmark various compute pass in order to find whitch step is slowing down the pipeline.
I don't know what "multi-pass pipeline" means in WebGPU.
There are 2 types of pipelines in WebGPU. Render pipelines and compute pipelines. Neither have "multiple passes".
If you have and check for and enable the "timestamp-query" feature then you can add timestamps to the beginning and end of a pass.
The steps are
GPUQuerySetwhich is an array of queriestimestampWritessection to your renderPassDescriptor or your computePassDescriptor that specifies which querySet to use and which indices in the queryset to write the beginning and ending timestamps for the passresolveQuerySet. This copies the query results to a bufferExample:
You can read more details here
note: you'll probably need to enable "webgpu developer features" in about:flags in Chrome or wait for v121 or v122