[PR #800] [CLOSED] [Store] Zero copy for Mooncake store get_tensor API #1832

Closed
opened 2026-10-29 21:30:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/800
Author: @jerrychenhf
Created: 9/2/2025
Status: ❌ Closed

Base: main ← Head: zero-copy-get-testor


📝 Commits (4)

  • c834522 Zero copy for Mooncake store get_tensor
  • 9b0a892 Delete the data ptr if register buffer failed
  • 7cb518a Code formatting
  • d84f466 Correct log message

📊 Changes

5 files changed (+93 additions, -17 deletions)

View changed files

📝 mooncake-integration/store/store_py.cpp (+6 -13)
📝 mooncake-store/include/client_buffer.hpp (+11 -0)
📝 mooncake-store/include/pybind_client.h (+3 -0)
📝 mooncake-store/src/client_buffer.cpp (+10 -4)
📝 mooncake-store/src/pybind_client.cpp (+63 -0)

📄 Description

Fix #799

To realize zero copy, we allocated a new buffer after getting the total length. The buffer is registered directly to transfer engine to read data directly into the buffer. The buffer is returned with ownership transferred to the caller. It will be used to create the tensor. For any error cases, the buffer needs to be freed until it is used for tensor (numpy array).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/Mooncake/pull/800 **Author:** [@jerrychenhf](https://github.com/jerrychenhf) **Created:** 9/2/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `zero-copy-get-testor` --- ### 📝 Commits (4) - [`c834522`](https://github.com/kvcache-ai/Mooncake/commit/c8345227c22fd4967f0117aa077628744f0211f5) Zero copy for Mooncake store get_tensor - [`9b0a892`](https://github.com/kvcache-ai/Mooncake/commit/9b0a8928f09b0ea83dbe2e6f2f2c02f3f1eb0bba) Delete the data ptr if register buffer failed - [`7cb518a`](https://github.com/kvcache-ai/Mooncake/commit/7cb518ad4f3db159c01b5c07df647d4288e9c3b0) Code formatting - [`d84f466`](https://github.com/kvcache-ai/Mooncake/commit/d84f4661094a98949031f7e75fca275d00f14010) Correct log message ### 📊 Changes **5 files changed** (+93 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-integration/store/store_py.cpp` (+6 -13) 📝 `mooncake-store/include/client_buffer.hpp` (+11 -0) 📝 `mooncake-store/include/pybind_client.h` (+3 -0) 📝 `mooncake-store/src/client_buffer.cpp` (+10 -4) 📝 `mooncake-store/src/pybind_client.cpp` (+63 -0) </details> ### 📄 Description Fix #799 To realize zero copy, we allocated a new buffer after getting the total length. The buffer is registered directly to transfer engine to read data directly into the buffer. The buffer is returned with ownership transferred to the caller. It will be used to create the tensor. For any error cases, the buffer needs to be freed until it is used for tensor (numpy array). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:30:42 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/Mooncake#1832
No description provided.