You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cub::DeviceReduce::{Arg,}{Max,Min} we guarantee to use std::numeric_limits<T>::{lowest,max} but what we actually use is cub::Traits<T>::{Lowest,Max}. This means that if a user specializes std::numeric_limits<T> for a custom type, there will still be a compilation error. Reproducer:
/cub/device/device_reduce.cuh(761): error: class "cub::Traits<A>" has no member "Lowest"
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:
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: