-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reduce to match the documentation and use numeric limits #920
Labels
breaking
Breaking change
Comments
Here is the issue to support half and bfloat16 in |
This was referenced Feb 15, 2025
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 20, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 21, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
bernhardmgruber
added a commit
to bernhardmgruber/cccl
that referenced
this issue
Feb 21, 2025
* Replace all uses of cub::Traits other than radix sort key twiddling by numeric_limits * Drop obsolete specializations of cub::NumericTraits * Fix radix sort custom type example mentioning non-existent cub::RadixTraits * Replace cub::BaseTraits and cub::Traits by aliases so uses can no longer specialize it * Deprecate cub::Traits::Max|Lowest * Extend documentation of trait classes Fixes: NVIDIA#920
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
cub::DeviceReduce::{Arg,}{Max,Min}
we guarantee to usestd::numeric_limits<T>::{lowest,max}
but what we actually use iscub::Traits<T>::{Lowest,Max}
. This means that if a user specializesstd::numeric_limits<T>
for a custom type, there will still be a compilation error. Reproducer:results in the following error:
Since this is broken, we should change the docs along with the code to use
::cuda::std::numeric_limits
instead. The only thing that prevents us from doing so is the fact that::cuda::std::numeric_limits
doesn't support extended floating point types (__half
,__nv_bfloat16
). @wmaxey for visibility.If this issue becomes critical, we'll have to wrap
::cuda::std::numeric_limits
into our own trait that supports extended floating point types. Otherwise, I'd prefer to wait till libcu++ trait supports extended fp types. Extended fp support in libcu++, it it's turn, is blocked by bf16 not being redistributable according to the EULA license (issue).The text was updated successfully, but these errors were encountered: