Skip to content

Implement cuda::sincos#6742

Merged
davebayer merged 8 commits intoNVIDIA:mainfrom
davebayer:sincos
Dec 1, 2025
Merged

Implement cuda::sincos#6742
davebayer merged 8 commits intoNVIDIA:mainfrom
davebayer:sincos

Conversation

@davebayer
Copy link
Contributor

If once wants to compute sin and cos of a number, computing both operations at the same time allows some optimizations.

This PR introduces cuda::sincos that tries to use compiler builtins and device intrinsics to provide this functionality and fallbacks to separate sin and cos calculation.

@davebayer davebayer requested a review from a team as a code owner November 23, 2025 11:40
@davebayer davebayer requested a review from griwes November 23, 2025 11:40
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 23, 2025
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Nov 23, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@davebayer davebayer force-pushed the sincos branch 2 times, most recently from 419077d to 05730ed Compare November 24, 2025 08:58
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@davebayer davebayer requested a review from miscco November 24, 2025 12:33
@davebayer davebayer self-assigned this Nov 24, 2025
@davebayer davebayer requested a review from s-oboyle November 24, 2025 17:29
@davebayer
Copy link
Contributor Author

@s-oboyle I've applied the function to even more places, could you confirm it is fine?

@github-actions

This comment has been minimized.

@github-project-automation github-project-automation bot moved this from In Review to In Progress in CCCL Nov 24, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

🥳 CI Workflow Results

🟩 Finished in 1h 21m: Pass: 100%/90 | Total: 1d 08h | Max: 1h 19m | Hits: 99%/201139

See results here.

@davebayer davebayer requested a review from fbusato December 1, 2025 10:00
#endif // _LIBCUDACXX_HAS_NVFP16()

#if _LIBCUDACXX_HAS_NVBF16()
__host__ __device__ bool is_about(__nv_bfloat16 x, __nv_bfloat16 y)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always think that one day we should provide these functions in libcu++ because they are used practically everywhere

@github-project-automation github-project-automation bot moved this from In Progress to In Review in CCCL Dec 1, 2025
@davebayer davebayer merged commit 0557696 into NVIDIA:main Dec 1, 2025
105 of 106 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Dec 1, 2025
@davebayer davebayer deleted the sincos branch December 1, 2025 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants