[BugFix] Avoid race conditions in zero-copy tensor transmission#17203
[BugFix] Avoid race conditions in zero-copy tensor transmission#17203DarkLight1337 merged 4 commits intovllm-project:mainfrom
Conversation
When reusing buffers and when sending direct references to tensor backing data that may be managed by the pytorch cpu allocator. In both cases we need to ensure ZMQ is finished with the buffer before reusing it. Also extend unit test to cover empty tensor case. Signed-off-by: Nick Hill <nhill@redhat.com>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
…-project#17203) Signed-off-by: Nick Hill <nhill@redhat.com>
…-project#17203) Signed-off-by: Nick Hill <nhill@redhat.com>
…-project#17203) Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Agata Dobrzyniewicz <adobrzyniewicz@habana.ai>
…-project#17203) Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
…-project#17203) Signed-off-by: Nick Hill <nhill@redhat.com> Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
When reusing buffers and when sending direct references to tensor backing data that may be managed by the pytorch cpu allocator.
In both cases we need to ensure ZMQ is finished with the buffer before reusing it.
Also extend unit test to cover empty tensor case.
Hopefully fixes #15207.