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

wgpu needs benchmarks #5443

Closed
jimblandy opened this issue Mar 27, 2024 · 3 comments · Fixed by #5694
Closed

wgpu needs benchmarks #5443

jimblandy opened this issue Mar 27, 2024 · 3 comments · Fixed by #5694
Labels
area: infrastructure Testing, building, coordinating issues type: enhancement New feature or request

Comments

@jimblandy
Copy link
Member

We know that we need to make some key architectural changes to wgpu's resource management, but wgpu's performance is a key selling point, and it's difficult to assess the impact of the changes we're considering without having benchmarks at hand.

The ideal would be something in CI, but we're sort of at zero right now, and we need some way to answer engineering questions. The benchmarks could be informal, require manual steps, be microbenchmarks, require use of external tools like Tracy - all would be a step forward.

@JMS55
Copy link
Collaborator

JMS55 commented Mar 27, 2024

To add to this, (iirc) when profiling Bevy we've seen wgpu logging having a significant amount of overhead, even when logging is not enabled. I wanted to look into profiling this and see if I could replicate and fix it, but it's difficult to hook Bevy up to newer wgpu versions, and I ended up working on something else. Having builtin benchmarks would be very useful.

@lylythechosenone
Copy link
Contributor

We could start by just including the tracing crate and putting its attribute on functions for some simple profiling.

Ideally we can get some proper benchmarks with criterion eventually. We can probably pretty easily port some of WebGPU's official benchmarks.

@FL33TW00D
Copy link
Contributor

@lylythechosenone For reference, I've hooked up wgpu to criterion here: https://github.com/FL33TW00D/wgpu-bench/blob/master/src/lib.rs#L165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants