Use forward declarations of extended floating point types instead of including the headers#5846
Merged
miscco merged 4 commits intoNVIDIA:mainfrom Sep 10, 2025
Merged
Conversation
davebayer
requested changes
Sep 10, 2025
Comment on lines
+80
to
+83
| struct __nv_fp8_e8m0; | ||
| struct __nv_fp8x2_e8m0; | ||
| struct __nv_fp8x4_e8m0; |
Contributor
There was a problem hiding this comment.
This should be guarded by _CCCL_HAS_NVFP8_E8M0(). Maybe we can move the forward declarations lower and guard all of them by their corresponding _CCCL_HAS_NVFPX macro
Contributor
Author
There was a problem hiding this comment.
This is the header that sets all the _CCCL_HAS_NVFPX macros
Contributor
Author
There was a problem hiding this comment.
I added the CTK check, so we should be fine
davebayer
approved these changes
Sep 10, 2025
bernhardmgruber
approved these changes
Sep 10, 2025
…including the headers The cuda floating point headers carry a lot of weight. We only really need those for `cmath` and `complex`, so try and get away with only forward declaring the types if available for in other places
…ations for CUB / thrust
d1d9245 to
c6c9edd
Compare
Contributor
🥳 CI Workflow Results🟩 Finished in 3h 36m: Pass: 100%/229 | Total: 8d 12h | Max: 3h 35m | Hits: 44%/348747See results here. |
miscco
added a commit
that referenced
this pull request
Sep 23, 2025
…including the headers (#5846) * Use forward declarations of extended floating point types instead of including the headers The cuda floating point headers carry a lot of weight. We only really need those for `cmath` and `complex`, so try and get away with only forward declaring the types if available for in other places * Also do not include the full headers when we only need forward declarations for CUB / thrust * Guard availability of `__nv_fp8_e8m0` on CTK version * Include header for floating_point tests
miscco
added a commit
that referenced
this pull request
Sep 23, 2025
…including the headers (#5846) * Use forward declarations of extended floating point types instead of including the headers The cuda floating point headers carry a lot of weight. We only really need those for `cmath` and `complex`, so try and get away with only forward declaring the types if available for in other places * Also do not include the full headers when we only need forward declarations for CUB / thrust * Guard availability of `__nv_fp8_e8m0` on CTK version * Include header for floating_point tests
miscco
added a commit
that referenced
this pull request
Sep 24, 2025
…pes instead of including the headers (#5846) (#5978) * Use forward declarations of extended floating point types instead of including the headers (#5846) * Use forward declarations of extended floating point types instead of including the headers The cuda floating point headers carry a lot of weight. We only really need those for `cmath` and `complex`, so try and get away with only forward declaring the types if available for in other places * Also do not include the full headers when we only need forward declarations for CUB / thrust * Guard availability of `__nv_fp8_e8m0` on CTK version * Include header for floating_point tests * Fix python builds?
pciolkosz
pushed a commit
to pciolkosz/cccl
that referenced
this pull request
Sep 24, 2025
…including the headers (NVIDIA#5846) * Use forward declarations of extended floating point types instead of including the headers The cuda floating point headers carry a lot of weight. We only really need those for `cmath` and `complex`, so try and get away with only forward declaring the types if available for in other places * Also do not include the full headers when we only need forward declarations for CUB / thrust * Guard availability of `__nv_fp8_e8m0` on CTK version * Include header for floating_point tests
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 cuda floating point headers carry a lot of weight.
We only really need those for
cmathandcomplex, so try and get away with only forward declaring the types if available for in other places