KhronosGroup / KhronosGroup/OpenCL-Docs
Specialization Constants and Floating-Point Operations
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
Creating this issue from a comment from an OpenCL 3.0 issue:
[#294 (comment)](https://github.com/KhronosGroup/OpenCL-Docs/issues/294#issuecomment-648970076)
> I would note the SPIR-V specification also describes floating-point operations for **OpSpecConstantOp** when using the **Kernel** execution model. It is typical to implement compile-time evaluation of floating-point operations using a software library, rather than relying on the floating-point unit of the system running the compiler (or in this case, the specializer). Otherwise, the precise behavior of the compiler (or specializer/translator) will be dependent on the system upon which it runs, with respect to rounding and the handling of NaNs. Determinism of the compiler (or specilizer/translator) is a desirable quality, and as such, implementing **OpSpecConstantOp** for floating-point operations to a reasonable standard would require adding extra dependencies to the _Khronos SPIR-V/LLVM Translator_, which is not a decision that should be made lightly.
Contributor guide
Research direction
Start with the linked comment in OpenCL issue #294 and the SPIR-V specification sections covering OpSpecConstantOp and floating-point operations under the Kernel execution model. Determine whether the OpenCL documentation needs clarification about deterministic evaluation, rounding, and NaN handling; done means the expected specification behavior is resolved and documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100