KhronosGroup / KhronosGroup/Vulkan-Docs

Feature Request: Actual fused multiply+add, high precision floating point division

Open
#1,973 2 comments 1 reaction 0 assignees View on GitHub
Feature Request Resolving Inside Khronos
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

GLSL.std.450's Fma is defined as unfused with potentially higher precision, there is no way to get real, guaranteed to be fused, fma. For some compute algorithms the extra precision from fused multiply and add is essential. Some hardware has both single cycle fma and unfused mad and the drivers choose to implement GLSL.std.450's Fma with mad. So it would be useful to have a spirv opcode which is guaranteed to be fused and also a device property that indicates the speed of real fma vs GLSL.std.450's Fma.

Similarly, for some algorithms it's useful to have high precision division. But Vulkan allows `a / b` to be implemented as `a * rcp(b)`. Hardware often has functionality to accelerate high precision division because it's needed for OpenCL. So an additional high precision opcode would be useful for applications which require higher precision.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Vulkan specification areas covering GLSL.std.450's Fma, floating-point division, SPIR-V opcodes, and device properties. Determine the required API and specification scope for guaranteed fused multiply-add and higher-precision division, then consider the work complete when the proposal has an agreed design and corresponding specification changes.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.