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

[naga] Implement subgroup quad ops #5684

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

valaphee
Copy link
Contributor

@valaphee valaphee commented May 9, 2024

Connections
Partially solves #5555
Resolves #5670
https://github.com/gpuweb/gpuweb/blob/main/proposals/subgroups.md

Description
Describe what problem this is solving, and how it's solved.

Testing
Explain how this change is tested.

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@valaphee valaphee marked this pull request as ready for review May 16, 2024 18:57
@valaphee valaphee requested review from a team as code owners May 16, 2024 18:57
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the (minimal) wgpu side

@@ -1300,6 +1300,8 @@ pub enum GatherMode {
ShuffleUp(Handle<Expression>),
/// Each gathers from their lane xored with the given by the expression
ShuffleXor(Handle<Expression>),
/// All gather from the same lane at the index given by the expression
QuadBroadcast(Handle<Expression>),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the proposal this expression needs to be a constant-expression due to a SPIR-V limitation.

Before version 1.5, Index must come from a constant instruction.

@@ -1138,6 +1138,38 @@ impl super::Instruction {
}
instruction.add_operand(value);

instruction
}
pub(super) fn group_non_uniform_quad_broadcast(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused.

@JMS55
Copy link
Contributor

JMS55 commented Sep 6, 2024

Any update on this?

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

Successfully merging this pull request may close these issues.

Subgroup quad operations
4 participants