Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU requires timestamps in nanoseconds #6719

Open
Draradech opened this issue Dec 13, 2024 · 2 comments
Open

WebGPU requires timestamps in nanoseconds #6719

Draradech opened this issue Dec 13, 2024 · 2 comments
Labels
area: correctness We're behaving incorrectly type: bug Something isn't working

Comments

@Draradech
Copy link

WebGPU requires timestamps in nanoseconds (https://gpuweb.github.io/gpuweb/#timestamp)
wgpu requires multiplication with get_timestamp_period (https://docs.rs/wgpu/latest/wgpu/enum.QueryType.html#variant.Timestamp)

This results in Firefox (135.0a1 (2024-12-11)) reporting wrong values on devices which don't use nanosecond resolution for their timestamps (like Intel Iris Xe)
Chart lists times (in ms) as wallclock / ts-query:
grafik

Test code (web and wgpu-py) is available here: https://glitch.com/edit/#!/rowan-pinnate-yacht

For reference: #3741

@Wumpf
Copy link
Member

Wumpf commented Dec 13, 2024

Firefox not providing the correct values is somewhat orthogonal arguably. Yes, as it stands Firefox has to implement a compute pass to convert the timestamp on-gpu when implementing WebGPU using wgpu since that's how wgpu is specified today.
However, I think we want at least be able to allow to avoid this additional overhead of gpu sided timestamp conversion. But likely that should be opt-in rather opt-out, otherwise it's confusing for anyone who is reasonably expecting wgpu to behave like the WebGPU api in that regard! 🤔

@cwfitzgerald
Copy link
Member

Yeah native should be off, using the timestamp period, and Firefox will turn it on in core.

Still need to implement it in wgpu though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: correctness We're behaving incorrectly type: bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants