more logging

This commit is contained in:
Hendrik Groove 2024-10-21 00:06:21 +02:00
parent db66fad9e9
commit e2e6b6e71f

View File

@ -991,6 +991,11 @@ auto Reduce(Policy policy, InputIt first, InputIt second, Init init, Func reduce
std::cerr << "Processing batch: offset=" << offset << ", batch_size=" << batch_size << std::endl;
hipError_t err = hipStreamQuery(stream);
if (err != hipSuccess && err != hipErrorNotReady) {
std::cerr << "Invalid stream: " << hipGetErrorString(err) << std::endl;
}
try {
auto ret = thrust::reduce(policy, begin_it, end_it, init, reduce_op);
aggregate = reduce_op(aggregate, ret);