remove logging

This commit is contained in:
Hendrik Groove 2024-10-21 21:24:47 +02:00
parent 94ffd57641
commit 768c8b298c

View File

@ -413,15 +413,11 @@ struct XGBDefaultDeviceAllocatorImpl : XGBBaseDeviceAllocator<T> {
} catch (const std::exception &e) {
ThrowOOMError(e.what(), n * sizeof(T));
}
std::cerr << "XGBDefaultDeviceAllocatorImpl: Allocated " << n * sizeof(T)
<< " bytes at " << ptr.get() << std::endl;
GlobalMemoryLogger().RegisterAllocation(ptr.get(), n * sizeof(T));
return ptr;
}
void deallocate(pointer ptr, size_t n) {
std::cerr << "XGBDefaultDeviceAllocatorImpl: Deallocating " << n * sizeof(T)
<< " bytes at " << ptr.get() << std::endl;
GlobalMemoryLogger().RegisterDeallocation(ptr.get(), n * sizeof(T));
SuperT::deallocate(ptr, n);
}
@ -468,14 +464,10 @@ struct XGBCachingDeviceAllocatorImpl : XGBBaseDeviceAllocator<T> {
ThrowOOMError(e.what(), n * sizeof(T));
}
}
std::cerr << "XGBCachingDeviceAllocatorImpl: Allocated " << n * sizeof(T)
<< " bytes at " << thrust_ptr.get() << std::endl;
GlobalMemoryLogger().RegisterAllocation(thrust_ptr.get(), n * sizeof(T));
return thrust_ptr;
}
void deallocate(pointer ptr, size_t n) {
std::cerr << "XGBCachingDeviceAllocatorImpl: Deallocating " << n * sizeof(T)
<< " bytes at " << ptr.get() << std::endl;
GlobalMemoryLogger().RegisterDeallocation(ptr.get(), n * sizeof(T));
if (use_cub_allocator_) {
GetGlobalCachingAllocator().DeviceFree(ptr.get());