diff --git a/mindspore/ccsrc/backend/optimizer/mem_reuse/mem_dynamic_allocator.h b/mindspore/ccsrc/backend/optimizer/mem_reuse/mem_dynamic_allocator.h index 486d63caff..644737cbd5 100644 --- a/mindspore/ccsrc/backend/optimizer/mem_reuse/mem_dynamic_allocator.h +++ b/mindspore/ccsrc/backend/optimizer/mem_reuse/mem_dynamic_allocator.h @@ -33,8 +33,8 @@ enum DynamicMemBufStatus : int { kMemBufIdle, kMemBufUsed }; // Alloc memory aligned according to 512 bytes. static const size_t DYNAMIC_MEM_ALIGN_SIZE = 512; -// The minimum unit size (500M) of memory block used for dynamic extend. -static const size_t DYNAMIC_MEM_ALLOC_UNIT_SIZE = 500 << 20; +// The minimum unit size (1G) of memory block used for dynamic extend. +static const size_t DYNAMIC_MEM_ALLOC_UNIT_SIZE = 1024 << 20; // The Comparator of device address from small to large. struct DeviceAddrCmp { diff --git a/mindspore/ccsrc/runtime/device/ascend/ascend_memory_pool.cc b/mindspore/ccsrc/runtime/device/ascend/ascend_memory_pool.cc index 8b51198f3c..40e875f703 100644 --- a/mindspore/ccsrc/runtime/device/ascend/ascend_memory_pool.cc +++ b/mindspore/ccsrc/runtime/device/ascend/ascend_memory_pool.cc @@ -76,7 +76,7 @@ size_t AscendMemoryPool::AlignMemorySize(size_t size) const { return size; } -size_t AscendMemoryPool::mem_alloc_unit_size() const { return DYNAMIC_MEM_ALLOC_UNIT_SIZE / 2; } +size_t AscendMemoryPool::mem_alloc_unit_size() const { return DYNAMIC_MEM_ALLOC_UNIT_SIZE / 4; } void AscendMemoryPool::set_device_mem_pool_base(uint8_t *device_mem_pool_base) { MS_EXCEPTION_IF_NULL(device_mem_pool_base);