KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator
Translation of OpSpecConstantOp to LLVM constant expressions to be implemented for floating point ops
- Dominant language
- LLVM
- Stars
- 625
- Forks
- 279
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
Translation of OpSpecConstantOp to LLVM IR is not yet implemented.
This issue is for implementing translation of the floating point ops to LLVM constant expressions, as required for Kernel SPIR-V.
So as to avoid adding the requirement for a softfloat library to the translator (for determinism between CPU architectures), it is acceptable for the results of floating point operations not to be constant folded as would be needed for those results to be available at translation time. It will therefore not be possible to use the result of conversion of a floating point OpSpecConstantOp into an integer to determine the size of an array, for example.
Contributor guide
Research direction
Start by locating the OpSpecConstantOp translation path and the existing handling for other operations in the SPIR-V to LLVM IR translator. Implement the floating-point operations as LLVM constant expressions while respecting the stated softfloat and constant-folding constraints, then verify that Kernel SPIR-V translation handles these operations and the documented array-size limitation remains clear.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100