stream logic

This commit is contained in:
Hendrik Groove 2024-10-21 23:24:10 +02:00
parent 20a9c223b6
commit 1931a70598
2 changed files with 0 additions and 33 deletions

View File

@ -979,11 +979,6 @@ auto Reduce(Policy policy, InputIt first, InputIt second, Init init, Func reduce
} catch (const std::exception& e) {
throw;
}
// Check for any HIP errors after the reduction
hipError_t hip_err = hipGetLastError();
if (hip_err != hipSuccess) {
}
}
return aggregate;
}

View File

@ -11,33 +11,6 @@
namespace xgboost {
void ArrayInterfaceHandler::SyncCudaStream(std::int64_t stream) {
#if defined(XGBOOST_USE_HIP)
if (stream == 1 || stream == 2) {
// Default streams, no synchronization needed
return;
}
hipEvent_t event;
hipError_t err = hipEventCreate(&event);
if (err != hipSuccess) {
LOG(WARNING) << "Failed to create HIP event: " << hipGetErrorString(err);
return;
}
err = hipEventRecord(event, reinterpret_cast<hipStream_t>(stream));
if (err != hipSuccess) {
LOG(WARNING) << "Failed to record HIP event: " << hipGetErrorString(err);
hipEventDestroy(event);
return;
}
err = hipStreamWaitEvent(hipStreamPerThread, event, 0);
if (err != hipSuccess) {
LOG(WARNING) << "Failed to wait for HIP event: " << hipGetErrorString(err);
}
hipEventDestroy(event);
#else
switch (stream) {
case 0:
/**
@ -58,7 +31,6 @@ void ArrayInterfaceHandler::SyncCudaStream(std::int64_t stream) {
dh::DefaultStream().Wait(e);
}
}
#endif
}
bool ArrayInterfaceHandler::IsCudaPtr(void const* ptr) {