-
Notifications
You must be signed in to change notification settings - Fork 195
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
Subgroup Operations #2557
Subgroup Operations #2557
Conversation
…sl-out TODO: metal out, figure out what needs to be done in validation
SPIR-V OpControlBarrier with execution scope Subgroup has implementation defined behavior when executed nonuniformly. OpenCL SPIR-V execution spec say nonuniform execution is UB. Vulkan SPIR-V execution spec says nothing :).
…eUp, GatherMode::ShuffleXor.
I've added some more changes on top of your branch to my branch: I think at this point we probably have all the features we'd want for the first iteration of this, modulo any review changes. |
Hello, thank you for your PR against Naga! As part of gfx-rs/wgpu#4231, we have moved development of Naga into the wgpu repository in the Naga subfolder. We have transferred all issues, but we are unable to automatically transfer PRs. As such, please recreate your PR against the wgpu repository. We apologize for the inconvenience this causes, but will make contributing to both projects more streamlined going forward. We are leaving PRs open, but once they are transferred, please close the original Naga PR. |
This continues the work of #2523, which looks like it was abandoned.
Voter operations (booleans):
subgroupBallot() -> vec4<u32>
subgroupBallot(vote: bool) -> vec4<u32>
subgroupAll(vote: bool) -> bool
subgroupAny(vote: bool) -> bool
Gather operations (scalars and vectors of f32, i32, u32):
subgroupBroadcastFirst(value) -> value
subgroupBroadcast(value, index) -> value
subgroupShuffle(value, index) -> value
subgroupShuffleDown(value, index_offset) -> value
subgroupShuffleUp(value, index_offset) -> value
subgroupShuffleXor(value, index_mask) -> value
Reduce operations (scalars and vectors of i32, u32):
subgroupAnd(value) -> value
subgroupOr(value) -> value
subgroupXor(value) -> value
Reduce operations (scalars and vectors of f32, i32, u32):
subgroupAdd(value) -> value
subgroupMul(value) -> value
subgroupMin(value) -> value
subgroupMax(value) -> value
Scan operations (scalars and vectors of f32, i32, u32):
subgroupPrefixExclusiveAdd(value) -> value
subgroupPrefixExclusiveMul(value) -> value
subgroupPrefixInclusiveAdd(value) -> value
subgroupPrefixInclusiveMul(value) -> value
Built-ins values added to the compute stage only:
num_subgroups: u32
subgroup_id: u32
Built-ins values added to the compute stage and fragment stage:
subgroup_size: u32
subgroup_invocation_id: u32
subgroupBarrier()
make sense