Home
last modified time | relevance | path

Searched refs:alloc_mem_size (Results 1 – 2 of 2) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/runtime/device/ascend/
Dascend_memory_pool.cc59 auto alloc_mem_size = ASCEND_DYNAMIC_MEM_ALLOC_UNIT_SIZE; in CalMemBlockAllocSize() local
66 while (alloc_mem_size < size) { in CalMemBlockAllocSize()
67 alloc_mem_size = alloc_mem_size * kDouble; in CalMemBlockAllocSize()
70 alloc_mem_size = ASCEND_DYNAMIC_MEM_ALLOC_UNIT_SIZE_FOR_GRAPH; in CalMemBlockAllocSize()
71 while (alloc_mem_size < size) { in CalMemBlockAllocSize()
72 alloc_mem_size = alloc_mem_size + ASCEND_DYNAMIC_MEM_ALLOC_UNIT_SIZE_FOR_GRAPH; in CalMemBlockAllocSize()
75 alloc_mem_size = std::min(alloc_mem_size, device_free_mem_size); in CalMemBlockAllocSize()
76 return alloc_mem_size; in CalMemBlockAllocSize()
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/mem_reuse/
Dmem_dynamic_allocator.cc111 size_t alloc_mem_size = CalMemBlockAllocSize(size); in AddMemBlockAndMemBuf() local
112 if (alloc_mem_size == 0) { in AddMemBlockAndMemBuf()
117 auto real_alloc_size = AllocDeviceMem(alloc_mem_size, &device_addr); in AddMemBlockAndMemBuf()
154 auto alloc_mem_size = mem_alloc_unit_size(); in CalMemBlockAllocSize() local
157 while (alloc_mem_size < size) { in CalMemBlockAllocSize()
158 alloc_mem_size = alloc_mem_size * kDouble; in CalMemBlockAllocSize()
160 alloc_mem_size = std::min(alloc_mem_size, device_free_mem_size); in CalMemBlockAllocSize()
161 return alloc_mem_size; in CalMemBlockAllocSize()