Repository navigation
fix: release device allocator cache after Accelerate offload - #369
Merged
meichangsu1 merged 1 commit intoNov 5, 2026
Merged
meichangsu1 merged 1 commit into
meichangsu1 merged 1 commit into
Conversation
werwrewe
marked this pull request as draft
November 5, 2026 09:19
werwrewe
marked this pull request as ready for review
November 5, 2026 09:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR type
PR information
GRPO 训练中,模型和优化器卸载到 CPU 后,原实现仅清理 CUDA 缓存。NPU 上未释放的缓存仍占用显存,可能导致 vLLM 唤醒 KV cache 时出现 aclrtMallocPhysical OOM。
将 CUDA 专用清理替换为已有的 release_caching_allocator()。该函数执行垃圾回收,并调用当前设备后端的缓存清理接口,已覆盖 CUDA empty_cache(),无需保留重复调用。