未验证 提交 fcbb307c 编写于 作者: R Ruibiao Chen 提交者: GitHub

Fix bug for AutoGrowthBestFitAllocator build (#45806)

上级 a2b2af90
......@@ -589,6 +589,7 @@ class AllocatorFacadePrivate {
std::make_shared<AutoGrowthBestFitAllocator>(
cuda_allocator,
platform::GpuMinChunkSize(),
/*chunk_size=*/0,
allow_free_idle_chunk_);
}
#else
......@@ -637,7 +638,10 @@ class AllocatorFacadePrivate {
#if defined(PADDLE_WITH_HIP)
auto cuda_allocator = CreateCUDAAllocator(p);
allocators_[p] = std::make_shared<AutoGrowthBestFitAllocator>(
cuda_allocator, platform::GpuMinChunkSize(), allow_free_idle_chunk);
cuda_allocator,
platform::GpuMinChunkSize(),
/*chunk_size=*/0,
allow_free_idle_chunk);
#endif
#if defined(PADDLE_WITH_CUDA)
......@@ -665,7 +669,10 @@ class AllocatorFacadePrivate {
} else {
auto cuda_allocator = CreateCUDAAllocator(p);
allocators_[p] = std::make_shared<AutoGrowthBestFitAllocator>(
cuda_allocator, platform::GpuMinChunkSize(), allow_free_idle_chunk);
cuda_allocator,
platform::GpuMinChunkSize(),
/*chunk_size=*/0,
allow_free_idle_chunk);
}
#else
......@@ -821,6 +828,7 @@ class AllocatorFacadePrivate {
allocators_[p] = std::make_shared<AutoGrowthBestFitAllocator>(
custom_allocator,
phi::DeviceManager::GetMinChunkSize(p),
/*chunk_size=*/0,
allow_free_idle_chunk);
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册