From bd8d2d8ba3799941ea7a867372f135b7216e8373 Mon Sep 17 00:00:00 2001 From: qijun Date: Fri, 28 Jul 2017 13:58:43 +0800 Subject: [PATCH] fix bug in memory GetGPUBuddyAllocator --- paddle/memory/memory.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/memory/memory.cc b/paddle/memory/memory.cc index c2e046926..207025f9b 100644 --- a/paddle/memory/memory.cc +++ b/paddle/memory/memory.cc @@ -60,6 +60,7 @@ detail::BuddyAllocator* GetGPUBuddyAllocator(int gpu_id) { platform::GpuMaxChunkSize()); } } + platform::SetDeviceId(gpu_id); return as[gpu_id]; } -- GitLab