diff --git a/cpp/include/raft/util/vectorized.cuh b/cpp/include/raft/util/vectorized.cuh --- a/cpp/include/raft/util/vectorized.cuh +++ b/cpp/include/raft/util/vectorized.cuh @@ -134,6 +134,22 @@ struct IOType<__half, 8> { typedef uint4 Type; }; template <> +struct IOType<__nv_bfloat16, 1> { + typedef __nv_bfloat16 Type; +}; +template <> +struct IOType<__nv_bfloat16, 2> { + typedef __nv_bfloat162 Type; +}; +template <> +struct IOType<__nv_bfloat16, 4> { + typedef uint2 Type; +}; +template <> +struct IOType<__nv_bfloat16, 8> { + typedef uint4 Type; +}; +template <> struct IOType<__half2, 1> { typedef __half2 Type; }; @@ -146,6 +162,18 @@ struct IOType<__half2, 4> { typedef uint4 Type; }; template <> +struct IOType<__nv_bfloat162, 1> { + typedef __nv_bfloat162 Type; +}; +template <> +struct IOType<__nv_bfloat162, 2> { + typedef uint2 Type; +}; +template <> +struct IOType<__nv_bfloat162, 4> { + typedef uint4 Type; +}; +template <> struct IOType { typedef int32_t Type; };