Name Strings

SPV_INTEL_16bit_atomics

Contact

To report problems with this extension, please open a new issue at:

Contributors

  • Ben Ashbaugh, Intel

  • Jianhui Li, Intel

  • Victor Mustya, Intel

  • Andrzej Ratajewski, Intel

  • Whitney Tsang, Intel

Status

  • Complete

Version

Last Modified Date

2026-11-06

Revision

1

Dependencies

This extension is written against the SPIR-V Specification, Version 1.6 Revision 8.

This extension requires SPIR-V 1.0.

This extension extends the SPV_EXT_shader_atomic_float_add and SPV_EXT_shader_atomic_float_min_max extensions, which provide the floating-point atomic operations used by this extension.

This extension depends on the SPV_KHR_bfloat16 extension, which adds the bfloat16 floating-point type used by this extension.

Overview

This extension extends the atomic support in SPIR-V to support atomic operations on 16-bit integers in memory, and to support atomic load, store, and exchange as well as floating-point atomic addition, minimum, and maximum on 16-bit bfloat16 floating-point numbers in memory.

Extension Name

To use this extension within a SPIR-V module, the following OpExtension must be present in the module:

OpExtension "SPV_INTEL_16bit_atomics"

Modifications to the SPIR-V Specification, Version 1.6

Modify Section 3.2.30, "Capability", adding to the Capability table:

Capability Implicitly Declares

6260

AtomicInt16CompareExchangeINTEL
Uses the OpAtomicLoad, OpAtomicStore, OpAtomicExchange, OpAtomicCompareExchange or OpAtomicCompareExchangeWeak instructions with 16-bit integer values.

Int16

6261

Int16AtomicsINTEL
Uses atomic instructions on 16-bit integer types.

AtomicInt16CompareExchangeINTEL

6262

AtomicBFloat16LoadStoreINTEL
Uses the OpAtomicLoad, OpAtomicStore, or OpAtomicExchange instructions with 16-bit bfloat16 floating point values.

BFloat16TypeKHR

6255

AtomicBFloat16AddINTEL
Uses the OpAtomicFAddEXT instruction with 16-bit bfloat16 floating point values.

BFloat16TypeKHR

6256

AtomicBFloat16MinMaxINTEL
Uses the OpAtomicFMinEXT or OpAtomicFMaxEXT instructions with 16-bit bfloat16 floating point values.

BFloat16TypeKHR

Add the AtomicBFloat16AddINTEL capability to the OpAtomicFAddEXT instruction added by SPV_EXT_shader_atomic_float_add:

OpAtomicFAddEXT

(The description of this instruction is unchanged from SPV_EXT_shader_atomic_float_add.)

Capability:
…​
AtomicBFloat16AddINTEL

7

6035

<id> Result type

Result <id>

<id> Pointer

Scope <id> Memory

Memory Semantics <id> Semantics

<id> Value

Add the AtomicBFloat16MinMaxINTEL capability to the OpAtomicFMinEXT and OpAtomicFMaxEXT instructions added by SPV_EXT_shader_atomic_float_min_max:

OpAtomicFMinEXT

(The description of this instruction is unchanged from SPV_EXT_shader_atomic_float_min_max.)

Capability:
…​
AtomicBFloat16MinMaxINTEL

7

5614

<id> Result type

Result <id>

<id> Pointer

Scope <id> Memory

Memory Semantics <id> Semantics

<id> Value

OpAtomicFMaxEXT

(The description of this instruction is unchanged from SPV_EXT_shader_atomic_float_min_max.)

Capability:
…​
AtomicBFloat16MinMaxINTEL

7

5615

<id> Result type

Result <id>

<id> Pointer

Scope <id> Memory

Memory Semantics <id> Semantics

<id> Value

Validation Rules

  • For all atomic instructions, the Result Type may be a 16-bit integer type, and the type of Value may be a 16-bit integer type.

    • If the Result Type for OpAtomicLoad, OpAtomicExchange, OpAtomicCompareExchange, or OpAtomicCompareExchangeWeak is a 16-bit integer type, then the AtomicInt16CompareExchangeINTEL capability must be declared.

    • If the type of Value for OpAtomicStore is a 16-bit integer type, then the AtomicInt16CompareExchangeINTEL capability must be declared.

    • For all other atomic instructions, if the Result Type is a 16-bit integer type or the type of Value is a 16-bit integer type, then the Int16AtomicsINTEL capability must be declared.

  • For the instructions OpAtomicLoad, OpAtomicStore, OpAtomicExchange, OpAtomicFAddEXT, OpAtomicFMinEXT, or OpAtomicFMaxEXT, the Result Type may be a 16-bit floating-point type with the BFloat16KHR encoding, and the type of Value may be a 16-bit floating-point type with the BFloat16KHR encoding.

    • If the Result Type for OpAtomicLoad or OpAtomicExchange is a 16-bit floating-point type with the BFloat16KHR encoding, then the AtomicBFloat16LoadStoreINTEL capability must be declared.

    • If the type of Value for OpAtomicStore is a 16-bit floating-point type with the BFloat16KHR encoding, then the AtomicBFloat16LoadStoreINTEL capability must be declared.

    • If the Result Type for OpAtomicFAddEXT is a 16-bit floating-point type with the BFloat16KHR encoding, then the AtomicBFloat16AddINTEL capability must be declared.

    • If the Result Type for OpAtomicFMinEXT or OpAtomicFMaxEXT is a 16-bit floating-point type with the BFloat16KHR encoding, then the AtomicBFloat16MinMaxINTEL capability must be declared.

Issues

  1. Do we need to support the case where bfloat16 values are represented as 16-bit integers where the bit pattern represents a bfloat16 value?

    RESOLVED: No, we will only support the case with a real bfloat16 type, specifically a 16-bit floating-point type with the BFloat16KHR encoding. This means that this extension has a dependency on SPV_KHR_bfloat16.

  2. Do we need a separate capability for an int16 atomic load and store?

    RESOLVED: No, this is not necessary. The AtomicInt16CompareExchangeINTEL capability will also enable support for 16-bit integer atomic loads, stores, and exchanges.

Revision History

Rev Date Author Changes

1

2026-11-06

Ben Ashbaugh

Initial revision for publication