Skip to content

Conversation

@zhangting2020
Copy link
Contributor

@zhangting2020 zhangting2020 commented Aug 7, 2025

PR Category

Performance Optimization

PR Types

Improvements

Description

improve Memory allocator

Pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Aug 7, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhangting2020 zhangting2020 changed the title improve Memory allocator improve memory allocator Aug 7, 2025
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Aug 25, 2025
@PaddlePaddle PaddlePaddle unlocked this conversation Aug 25, 2025
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 19 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@1001dda). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...emory/allocation/auto_growth_best_fit_allocator.cc 86.90% 11 Missing ⚠️
...dle/phi/core/memory/allocation/allocator_facade.cc 75.00% 5 Missing ⚠️
...ry/allocation/auto_growth_best_fit_allocator_v2.cc 33.33% 2 Missing ⚠️
paddle/phi/core/allocator.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #74463   +/-   ##
==========================================
  Coverage           ?   83.76%           
==========================================
  Files              ?        5           
  Lines              ?      117           
  Branches           ?        0           
==========================================
  Hits               ?       98           
  Misses             ?       19           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@liuruyan liuruyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确认一下状态:AutoGrowthBestFitAllocator升级了大小池,AutoGrowthBestFitAllocatorV2暂时还没有?

Comment on lines 945 to 950
if (FLAGS_use_auto_growth_v2 || FLAGS_use_cuda_malloc_async_allocator ||
FLAGS_use_virtual_memory_auto_growth) {
VLOG(6) << "PreAlloc is not implemented for "
"AutoGrowthBestFitAllocatorV2, CUDAMallocAsyncAllocator or "
"VirtualMemoryAutoGrowthBestFitAllocator.";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个if分支内是否应该添加return?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

liuruyan
liuruyan previously approved these changes Aug 28, 2025
Copy link
Contributor

@liuruyan liuruyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhangting2020
Copy link
Contributor Author

确认一下状态:AutoGrowthBestFitAllocator升级了大小池,AutoGrowthBestFitAllocatorV2暂时还没有?

是的,v2暂时不做支持,后续梳理v2到底是否有被使用。

zhangbo9674
zhangbo9674 previously approved these changes Aug 28, 2025
@phlrain phlrain self-requested a review August 28, 2025 02:45
phlrain
phlrain previously approved these changes Aug 28, 2025
@zhangting2020 zhangting2020 reopened this Aug 29, 2025
@zhangting2020 zhangting2020 merged commit a492585 into PaddlePaddle:develop Aug 29, 2025
107 of 121 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants