← Back to release summary
WebGPU f16 support
- Category
- Graphics
- Type
- Chromium catches up
- Status
- Enabled by default (Chrome 120)
- Intent stage
- None
Summary
Allows for the use of the half-precision floating-point type f16 in WebGPU shaders (WGSL).
Developers can use the 'shader-f16' feature from the WebGPU spec and the 'f16' extension from the WGSL spec to access 16-bit floating point variables and APIs in their shaders.
Standards & signals
- Specification: https://www.w3.org/TR/webgpu/#shader-f16
- Firefox: Positive — Mozilla has already implemented this feature.
- Safari: Positive
- Web developers: Positive — f16 support in general has been requested feature in multiple different web runtimes/frameworks, e.g. https://github.com/microsoft/onnxruntime/issues/9758 and http://tc39.es/proposal-float16array/
From the initial proposal, https://github.com/gpuweb/gpuweb/issues/658, there were multiple benchmarks/demoes that indicate a substantial performance benefit shown in demos/tests, ~25% if ALU bound, and upto 50% if memory bound.
TF.js has been investigating using f16 in WebGPU, https://github.com/gpuweb/gpuweb/issues/658#issuecomment-606492757 and already has it available in the WebGL implementation
TF.js has significant improvements from forcing using Half Float (the GL equivalent feature), https://github.com/tensorflow/tfjs/issues/1047
The Dawn team has interacted with multiple internal and external partners that have indicated that f16 support is an important feature for them to get the performance needed to adopt WebGPU
View on chromestatus.com