Name Strings
SPV_KHR_subgroup_rotate
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Kevin Petit, Arm Ltd.
-
Ruihao Zhang, Qualcomm
-
Faith Ekstrand, Collabora
-
Graeme Leese, Broadcom
-
Alan Baker, Google
-
Caio Oliveira, Intel
-
Jeff Bolz, NVIDIA
Notice
Copyright (c) 2022 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Approved by the SPIR-V Working Group: 2022-03-02
-
Approved by the Khronos Board of Promoters: 2022-04-15
Version
Last Modified Date |
2022-03-02 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification Version 1.5 Revision 5.
This extension requires SPIR-V 1.3.
Overview
This extension adds a new instruction that enables rotating values across invocations within a subgroup. Taking the example of a subgroup of size 16, a rotation by an amount of 2 would, when executed by the invocation identified by id 0, return the value from the invocation identified by the id 2. The same rotation instruction, when executed by the invocation identified by id 14, would return the value from the invocation identified by id 0.
A rotation by an amount of N rotates values "down" N invocations within the subgroup.
A rotation by an amount of (SubgroupSize - N) rotates values "up" N invocations within the subgroup.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_KHR_subgroup_rotate"
Modifications to the SPIR-V Specification, Version 1.5
Capabilities
Modify Section 3.31, "Capability", adding these rows to the Capability table:
Capability | Implicitly declares | |
---|---|---|
6026 |
GroupNonUniformRotateKHR |
GroupNonUniform |
Instructions
Add the new instruction:
OpGroupNonUniformRotateKHR |
Capability: |
||||||
6 + variable |
4431 |
<id> |
Scope <id> |
<id> |
<id> |
Optional <id> ClusterSize |
Issues
None.
Revision History
Rev | Date | Author | Changes |
---|---|---|---|
1 |
2022-03-02 |
Kevin Petit |
Initial revision |