-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[XPU] support python memory api in XPU #73189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
bc6ce4f to
b97660d
Compare
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (14.86%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #73189 +/- ##
==========================================
Coverage ? 14.86%
==========================================
Files ? 2
Lines ? 74
Branches ? 0
==========================================
Hits ? 11
Misses ? 63
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1e3b68c to
68e904e
Compare
|
/re-run all-failed |
|
Sorry to inform you that b7bad79's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
|
/re-run cpu |
|
/re-run all-failed |
| ) # with MB | ||
| mem_used = ( | ||
| core.get_xpu_device_used_memory(dev_id) / 1024 / 1024 | ||
| ) # with MB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lj970926
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
RuohengMa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
HarperCy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| __all__ = [ | ||
| 'synchronize', | ||
| 'device_count', | ||
| 'set_debug_level', | ||
| 'empty_cache', | ||
| 'max_memory_allocated', | ||
| 'max_memory_reserved', | ||
| 'reset_max_memory_allocated', | ||
| 'reset_max_memory_reserved', | ||
| 'memory_allocated', | ||
| 'memory_reserved', | ||
| 'memory_total', # memory maneged by runtime, not paddle | ||
| 'memory_used', # memory maneged by runtime, not paddle | ||
| ] | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以新增这些API,但按照新增API的要求,需要在 docs reop 中增加中文文档,方便用户在Paddle官网搜索和使用,详细可以参考官网新增API文档说明
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已提文档PR docs仓库PR,由于文档中需要调用代码信息,因此需要paddle仓库先合入,docs仓库才能合入。
|
/re-run all-failed |
sunzhongkai588
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
需要在 docs 仓库同步中文文档
|
/re-run all-failed |
|
/re-run dcu |
|
/re-run all-failed |

PR Category
Custom Device
PR Types
New features
Description
Support python memory api in XPU, including max_memory_allocated, max_memory_reserved, reset_max_memory_allocated, reset_max_memory_reserved, memory_allocated, memory_reserved