helinwang-patch-1
Yu Yang 7 years ago
parent ed7727e8f0
commit 176277b824

@ -90,6 +90,7 @@ size_t Used<platform::CUDAPlace>(platform::CUDAPlace place) {
template <>
void* Alloc<platform::CUDAPlace>(platform::CUDAPlace place, size_t size) {
auto* buddy_allocator = GetGPUBuddyAllocator(place.device);
VLOG(30) << "Allocating " << size << " bytes on " << place;
auto* ptr = buddy_allocator->Alloc(size);
if (ptr == nullptr) {
int cur_dev = platform::GetCurrentDeviceId();

Loading…
Cancel
Save