KhronosGroup / KhronosGroup/OpenCL-Docs
clarify when the default rounding mode for halfs can be rtz
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
The SPIR-V environment spec currently says:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Env.html#_rounding_modes
> For half precision operations, devices may support either Round to nearest even or Round toward zero as the default rounding mode for half precision operations.
It would be better to use a few more words here to describe when the default rounding mode can be round to nearest even and when it can be round toward zero. For example, the OpenCL C part of the cl_khr_fp16 extension says:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_fp16-rounding-modes
> If CL_FP_ROUND_TO_NEAREST is supported, the default rounding mode for half-precision floating-point operations will be round to nearest even; otherwise the default rounding mode will be round to zero.
Contributor guide
Research direction
Read the SPIR-V environment spec's Rounding Modes section and compare its half-precision wording with the cl_khr_fp16 extension's Rounding Modes section at the linked OpenCL specification URLs. Update the explanation so it states when the default is round to nearest even versus round toward zero, then verify that the surrounding specification text remains consistent.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100