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

Fix bug for AutoGrowthBestFitAllocator build (#45806)

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