Skip to content

Conversation

@bashbaug
Copy link
Contributor

@bashbaug bashbaug commented Sep 8, 2025

Adds the proposed SPV_INTEL_shader_atomic_bfloat16 extension specification, which extends the floating-point atomic support in SPIR-V to support floating-point atomic addition, minimum, and maximum on 16-bit bfloat16 floating-point numbers in memory.

@bashbaug bashbaug requested a review from a team as a code owner September 8, 2025 22:34
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 10, 2025
Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 11, 2025
Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 14, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 15, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3344)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

---------

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3345)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

---------

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3346)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

---------

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3347)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

---------

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3348)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 16, 2025
…on (#3343) (#3349)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
@bashbaug
Copy link
Contributor Author

We may want to consider broadening this extension to support 16-bit atomics more generally vs. just bfloat16 atomics. Here's what this might look like:

  • Add a capability for 16-bit integer atomics, perhaps Int16Atomics, similar to the Int64Atomics capability for 64-bit integer atomics. We could slice this more finely if we would like and add capabilities for specific 16-bit atomic operations.
  • Figure out a more appropriate name for the extension, since it wouldn't just be for bfloat16 atomics anymore.

Just like in this current draft for bfloat16 atomics, I don't think we would need any new instructions, and would just support 16-bit types for existing atomic instructions.

MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 22, 2025
…on (KhronosGroup#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 22, 2025
…on (#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 26, 2025
…3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 26, 2025
…on (KhronosGroup#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
iclsrc pushed a commit that referenced this pull request Sep 27, 2025
Spec is available here:
#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@8e8c02c4b803062
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 29, 2025
…on (KhronosGroup#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 29, 2025
…on (KhronosGroup#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

note for llvm14 branch: removed atomicrmw_fminfmax.ll test as it seems
like llvm14 don't have atomicrmw fmin

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Sep 29, 2025
…on (KhronosGroup#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

note for llvm14 branch: removed atomicrmw_fminfmax.ll test as it seems
like llvm14 don't have atomicrmw fmin

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 29, 2025
…on (#3343)

Spec is available here:
intel/llvm#20009

Author:
"Ratajewski, Andrzej" <andrzej.ratajewski@intel.com>

note for llvm14 branch: removed atomicrmw_fminfmax.ll test as it seems
like llvm14 don't have atomicrmw fmin

Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
@bashbaug bashbaug requested a review from a team as a code owner October 23, 2025 21:47
@bashbaug bashbaug changed the title [SPIR-V][Doc] add draft SPIR-V extension for bfloat16 atomics [SPIR-V][Doc] add draft SPIR-V extension for 16-bot atomics Oct 23, 2025
@bashbaug bashbaug changed the title [SPIR-V][Doc] add draft SPIR-V extension for 16-bot atomics [SPIR-V][Doc] add draft SPIR-V extension for 16-bit atomics Oct 23, 2025
@bashbaug
Copy link
Contributor Author

I've generalized this extension for 16-bit atomics, as described above. The SPIR-V extension still contains separate capabilities, so it is possible to only support bfloat16 atomics if desired, but it is also possible to support 16-bit integer atomics as well. Note that fp16 atomics are already supported by other extensions.

The OpenCL extension proposal in this PR shows possible API queries so implementations could advertise only the 16-bit atomic operations they support.

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

Successfully merging this pull request may close these issues.

1 participant