-
Notifications
You must be signed in to change notification settings - Fork 520
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
fix(pt): improve out-of-memory handling #3836
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughThe Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant System
participant GPU
participant torch
User->>System: Run computation
System->>GPU: Execute task
GPU-->>System: Return error (e.g., CUDA out of memory, CUSOLVER_STATUS_INTERNAL_ERROR)
System->>System: Check if error is OOM
alt Error is OOM
System->>torch: torch.cuda.empty_cache()
torch-->>System: Cache cleared
System->>User: Return True
else Error is not OOM
System->>User: Return False
end
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
for more information, see https://pre-commit.ci
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.
Actionable comments posted: 1
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #3836 +/- ##
==========================================
- Coverage 82.53% 82.52% -0.01%
==========================================
Files 513 513
Lines 49040 49043 +3
Branches 2987 2985 -2
==========================================
Hits 40473 40473
- Misses 7656 7659 +3
Partials 911 911 ☔ View full report in Codecov by Sentry. |
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved handling of out-of-memory errors by including "CUSOLVER_STATUS_INTERNAL_ERROR" and releasing cached memory to prevent crashes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Han Wang <92130845+wanghan-iapcm@users.noreply.github.com>
Summary by CodeRabbit