Support SaturatedToLargestFloat8NormalConversionEXT decoration#3767
Open
vmaksimo wants to merge 3 commits into
Open
Support SaturatedToLargestFloat8NormalConversionEXT decoration#3767vmaksimo wants to merge 3 commits into
SaturatedToLargestFloat8NormalConversionEXT decoration#3767vmaksimo wants to merge 3 commits into
Conversation
Add round-trip handling for `SPV_EXT_float8`'s saturating FP-to-FP8 conversion. At the LLVM IR level it is represented via `_sat` suffix on the existing `__builtin_spirv_Convert<Src>To<E4M3|E5M2>EXT` interface. When `_sat` is present, the resulting OpFConvert is decorated with `SaturatedToLargestFloat8NormalConversionEXT`. AI-assisted: Claude Opus 4.7 (commercial SaaS)
Contributor
Shouldn't it be |
Contributor
Author
I believe it can be both, wanted to publish this for discussion to choose the preferrable one. |
Contributor
|
I'd not create instances without necessity :) |
Address review feedback on the previous commit: instead of introducing a `_sat` suffix on `__builtin_spirv_Convert<Src>To<E4M3|E5M2>EXT`, reuse the existing `__builtin_spirv_ClampConvert<Src>To<E4M3|E5M2>INTEL` interface from `SPV_INTEL_fp_conversions`. When `SPV_EXT_float8` is enabled, those four FP8-result entries are now emitted as `OpFConvert` decorated with `SaturatedToLargestFloat8NormalConversionEXT` instead of `OpClampConvertFToFINTEL`, and round-trip back to the same builtin names. The reverse translator also rejects modules where this decoration targets a non-FP8 conversion: per spec it may only decorate `OpFConvert`/`OpConvertSToF`/`OpConvertUToF` with an `Float8E4M3EXT` or `Float8E5M2EXT` Result Type, and `spirv-val` does not enforce this yet. AI-assisted: Claude Opus 4.7 (commercial SaaS)
Contributor
Author
|
CI failures are caused by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add round-trip handling for
SPV_EXT_float8's saturating FP-to-FP8 conversion.At the LLVM IR level it is represented via
_satsuffix on the existing__builtin_spirv_Convert<Src>To<E4M3|E5M2>EXTinterface. When_satis present, the resulting OpFConvert is decorated withSaturatedToLargestFloat8NormalConversionEXT.AI-assisted: Claude Opus 4.7 (commercial SaaS)