Skip to content

fix(core): drain GPU workers before unregister#409

Closed
xiaguan wants to merge 1 commit into
masterfrom
fix/drain-before-unregister
Closed

fix(core): drain GPU workers before unregister#409
xiaguan wants to merge 1 commit into
masterfrom
fix/drain-before-unregister

Conversation

@xiaguan

@xiaguan xiaguan commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • reject new GPU transfers and drain both worker streams before removing an instance
  • synchronize CUDA streams at the drain barrier, including transfer error paths
  • make server cleanup wait for the engine drain before releasing registered CUDA tensors
  • serialize cleanup against registration and session creation, and keep cleanup running after caller cancellation
  • preserve the synchronous unregister APIs while adding drained variants for allocation owners

Testing

  • prek run
  • core unit tests: 127 passed, 1 ignored
  • server unit tests: 23 passed
  • HTTP cleanup integration test: 1 passed

Signed-off-by: xiaguan <751080330@qq.com>
@xiaguan

xiaguan commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Folded into #407 so native CUDA IPC registration and the required drain-before-unmap lifecycle are reviewed and merged together.

@xiaguan xiaguan closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant