Repository navigation
Document that 64-bit floating-point types are enabled by default - #1738
Merged
Merged
Conversation
rjodinchr
requested changes
Nov 11, 2026
rjodinchr
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for catching that this section was outdated regarding -fp64! Because FP64 support in clspv is still partial (#321) — e.g. degrees/radians and --cl-native-math still emit invalid SPIR-V for double — I left a couple of suggestions to document FP64 as partially supported across all double scalar/vector types and clarify the section heading.
The 64-bit types section still says `double` types must not be used, but `-fp64` defaults to on. Update the section to reflect the current behavior, document `-fp64=0`, and rename the heading to `64-Bit Floating-Point Types` since `long`/`ulong` are unaffected by `-fp64`. FP64 support is still incomplete (google#321). Document all `double` scalar/vector types, including `double8`/`double16` (which require `-long-vector`), and note the current limitations of `degrees()`/`radians()` and native math built-ins. Verified with the local clspv build: - A `double` kernel compiles and passes `spirv-val` by default. - The same kernel fails to compile with `-fp64=0`. - A `float` kernel still compiles with `-fp64=0`. - `long`/`ulong` still compile and pass `spirv-val` with `-fp64=0`. - `double8`/`double16` compile and pass `spirv-val` with `-long-vector`, and fail to compile without it or with `-fp64=0`. - `degrees()`/`radians()` on `double` fail `spirv-val` even with default options. - `sin()`/`exp()` on `double` fail `spirv-val` with `-cl-native-math` or `-use-native-builtins`.
cyrne1-7208
force-pushed
the
p2-docs-fp64
branch
from
November 11, 2026 09:31
ee92a08 to
ceeab1b
Compare
rjodinchr
reviewed
Nov 11, 2026
Co-authored-by: Romaric Jodin <rjodin@chromium.org>
rjodinchr
reviewed
Nov 11, 2026
Co-authored-by: Romaric Jodin <rjodin@chromium.org>
rjodinchr
approved these changes
Nov 11, 2026
Contributor
Author
|
Thanks @rjodinchr for the helpful suggestions and the approval! The general FP64 note is cleaner and less likely to go stale as individual built-ins are fixed, and the heading now correctly scopes the section to floating-point types. I appreciate the review. |
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.
The 64-bit types section still says
doubletypes must not be used, but-fp64defaults to on. Update the section to reflect the currentbehavior, document
-fp64=0, and rename the heading to64-Bit Floating-Point Typessincelong/ulongare unaffected by-fp64.FP64 support is still incomplete (#321). Document all
doublescalar/vector types, including
double8/double16(which require-long-vector), and note the current limitations ofdegrees()/radians()and native math built-ins.Verified with the local clspv build:
doublekernel compiles and passesspirv-valby default.-fp64=0.floatkernel still compiles with-fp64=0.long/ulongstill compile and passspirv-valwith-fp64=0.double8/double16compile and passspirv-valwith-long-vector,and fail to compile without it or with
-fp64=0.degrees()/radians()ondoublefailspirv-valeven with defaultoptions.
sin()/exp()ondoublefailspirv-valwith-cl-native-mathor-use-native-builtins.