| 123 | |
| 124 | template <class T> |
| 125 | static TDistributedObject<std::remove_const_t<T>> TailImpl(const TCudaBuffer<T, TStripeMapping>& data, ui32 stream) { |
| 126 | Y_ASSERT(data.GetObjectsSlice().Size()); |
| 127 | auto result = TCudaBuffer<std::remove_const_t<T>, TStripeMapping, EPtrType::CudaHost>::Create(data.GetMapping().RepeatOnAllDevices(1, data.GetMapping().SingleObjectSize())); |
| 128 | |
| 129 | using TKernel = TTailKernel<std::remove_const_t<T>, EPtrType::CudaHost>; |
| 130 | LaunchKernels<TKernel>(result.NonEmptyDevices(), stream, data, result); |
| 131 | |
| 132 | TVector<std::remove_const_t<T>> resultVec; |
| 133 | result.Read(resultVec, stream); |
| 134 | auto res = CreateDistributedObject<std::remove_const_t<T>>(0); |
| 135 | for (ui32 i = 0; i < NCudaLib::GetCudaManager().GetDeviceCount(); ++i) { |
| 136 | res.Set(i, resultVec[i]); |
| 137 | } |
| 138 | return res; |
| 139 | } |
| 140 | |
| 141 | #define Y_CATBOOST_CUDA_F_IMPL(T) \ |
| 142 | template <> \ |
nothing calls this directly
no test coverage detected