To report problems with this extension, please open a new issue at:
This extension is written against the SPIR-V Specification, Version 1.6 Revision 2.
This extension requires SPIR-V 1.0.
This extension adds instructions to convert between single-precision 32-bit
floating-point values and 16-bit bfloat16
values.
The bfloat16
floating-point format is a truncated variant of the IEEE 754
single-precision 32-bit floating-point format with one sign bit, eight exponent
bits, and seven mantissa bits.
This gives the 16-bit bfloat16
format similar dynamic range as the 32-bit
float
format, albeit with lower precision than the 16-bit half
format.
Please note that this extension does not introduce a bfloat16
type to SPIR-V
and instead the new instructions convert to or from a 16-bit integer type whose
bit pattern represents a bfloat16
value.
To use this extension within a SPIR-V module, the appropriate OpExtension must be present in the module:
OpExtension "SPV_INTEL_bfloat16_conversion"
Modify Section 3.31, Capability, adding rows to the Capability table:
Capability | Implicitly Declares | |
---|---|---|
6115 |
BFloat16ConversionINTEL |
Add to Section 3.42.11, Conversion Instructions: