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

Subgroups 🏎️ #167

Closed
FL33TW00D opened this issue Apr 16, 2024 · 3 comments
Closed

Subgroups 🏎️ #167

FL33TW00D opened this issue Apr 16, 2024 · 3 comments

Comments

@FL33TW00D
Copy link
Collaborator

FL33TW00D commented Apr 16, 2024

Looks like subgroups are going to land imminently on wgpu as per here: gfx-rs/wgpu#5301

Integrating these should be fun. Few thoughts on what should be done here:

  1. We need some kind of native vs web feature flag, since subgroups haven't shipped on web yet.
  2. We need to identify which kernels can benefit (hint. anything with a reduction)
  3. Write up some benchmarks on https://github.com/FL33TW00D/wgpu-bench

References:
https://fleetwood.dev/posts/layernorm-as-fast-as-possible
https://github.com/FL33TW00D/wgpu-bench/blob/master/kernels/layernorm/welford_vec4.wgsl#L47

@AmineDiro
Copy link

In addition to reduce ops, Subgroups can also be useful for warp aware compute like warptiling

@FL33TW00D
Copy link
Collaborator Author

In addition to reduce ops, Subgroups can also be useful for warp aware compute like warptiling

Yeah I think the reduction would do nicely in the new GEMV kernels πŸ”₯

@FL33TW00D
Copy link
Collaborator Author

Completed in #220

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants