-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Labels
questionFurther information is requestedFurther information is requested
Description
I tried to use raft::matrix::select_k
for bfloat16 type data (nv_bfloat16)
Got compilation error
In file included from raft_topk_bf16_test.cu.cc:10:
In file included from third_party/raft/cpp/include/raft/matrix/select_k.cuh:19:
In file included from third_party/raft/cpp/include/raft/matrix/detail/select_k.cuh:18:
In file included from third_party/raft/cpp/include/raft/matrix/detail/select_k-inl.cuh:20:
In file included from third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:25:
In file included from third_party/raft/cpp/include/raft/linalg/map.cuh:21:
In file included from third_party/raft/cpp/include/raft/linalg/detail/map.cuh:26:
third_party/raft/cpp/include/raft/util/vectorized.cuh:267:45: error: no type named 'Type' in 'raft::IOType<__nv_bfloat16, 8>'
267 | typedef typename IOType<math_t, veclen_>::Type io_t;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:160:30: note: in instantiation of template class 'raft::TxN_t<__nv_bfloat16, 8>' requested here
160 | using align_elems = Pow2<wide_t::Ratio>;
| ^
third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:1003:5: note: in instantiation of function template specialization 'raft::matrix::detail::select::radix::impl::vectorized_process<__nv_bfloat16, unsigned int, (lambda at third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:999:14)>' requested here
1003 | vectorized_process(threadIdx.x, blockDim.x, in_buf, previous_len, f);
| ^
third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:1129:5: note: in instantiation of function template specialization 'raft::matrix::detail::select::radix::impl::filter_and_histogram_for_one_block<__nv_bfloat16, unsigned int, 8>' requested here
1129 | filter_and_histogram_for_one_block<T, IdxT, BitsPerPass>(in_buf,
| ^
third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:1185:24: note: in instantiation of function template specialization 'raft::matrix::detail::select::radix::impl::radix_topk_one_block_kernel<__nv_bfloat16, unsigned int, 8, 512, true>' requested here
1185 | auto kernel = radix_topk_one_block_kernel<T, IdxT, BitsPerPass, BlockSize, len_or_indptr>;
| ^
third_party/raft/cpp/include/raft/matrix/detail/select_radix.cuh:1311:11: note: in instantiation of function template specialization 'raft::matrix::detail::select::radix::impl::radix_topk_one_block<__nv_bfloat16, unsigned int, 8, 512, true>' requested here
1311 | impl::radix_topk_one_block<T, IdxT, BitsPerPass, BlockSize, len_or_indptr>(
| ^
third_party/raft/cpp/include/raft/matrix/detail/select_k-inl.cuh:260:32: note: in instantiation of function template specialization 'raft::matrix::detail::select::radix::select_k<__nv_bfloat16, unsigned int, 8, 512, true>' requested here
260 | detail::select::radix::select_k<T, IdxT, 8, 512>(handle,
| ^
third_party/raft/cpp/include/raft/matrix/select_k.cuh:106:18: note: in instantiation of function template specialization 'raft::matrix::detail::select_k<__nv_bfloat16, unsigned int>' requested here
106 | return detail::select_k<T, IdxT>(handle,
| ^
raft_topk_bf16_test.cu.cc:80:17: note: in instantiation of function template specialization 'raft::matrix::select_k<__nv_bfloat16, unsigned int>' requested here
80 | raft::matrix::select_k<KT, uint32_t>(
What can be done to add support for nv_bfloat16 type?
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
Type
Projects
Status
Todo