mirror of
https://github.com/kvcache-ai/Mooncake.git
synced 2026-11-05 01:17:55 +00:00
[GH-ISSUE #98] run transfer_engine_bench.cpp in NPU device error #54
Labels
No labels
ascend
auto-closed
bug
bug
CI/Build
Common
documentation
enhancement
feature request
good first issue
help wanted
high priority
MetaX
nightly-failure
pull-request
PyTorch Backend
question
RFC
Roadmap
stale
Store
Tests
Transfer Engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/Mooncake#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zx-ai on GitHub (Feb 12, 2025).
Original GitHub issue: https://github.com/kvcache-ai/Mooncake/issues/98
After compiling (without enabling USE_CUDA), I successfully ran a demo on the NPU device (transferring data from A machine's DRAM to B machine's DRAM).
In order to verify if data can be transferred from the NPU memory of machine A to the NPU memory of machine B using the transfer_engine on NPU devices.So, I attempted to modify the allocateMemoryPool() function on machine A, using the aclrtMalloc function to allocate memory on the NPU device.
static void *allocateMemoryPool(size_t size, int socket_id,
bool from_vram = false) {
#ifdef USE_ATLAS
if (from_vram) {
void *d_buf;
aclrtMalloc(&d_buf, size, ACL _MEM_MALLOC_HUGE_FIRST);
return d_buf;
}
#endif
return numa_alloc_onnode(size, socket_id);
}
Upon running the modified code, I encountered an error:
E0212 17:34:25.448876 212704 rdma_context.cpp:227] Fail to register memory 0x14ef5930: Cannot allocate memory [12]
*** Check failure stack trace: ***F0212 17:34:25.448904 212704 transfer_engine_bench.cpp:286] Assert failed: !rc
I am curious as to why GPU memory can be registered using the ibv_reg_mr() function, whereas NPU memory cannot be successfully registered. And Is there any way to solve this problem? Currently, can the main version or the V2.0 tag solve this problem? Will this project support deployment on NPU devices in the future?
I am very much looking forward to your response. Thank you again.
@alogfans commented on GitHub (Feb 13, 2025):
duplicated with #97.
@stmatengss commented on GitHub (Feb 13, 2025):
Currently, our project does not support NPU devices, and the error you encountered is likely due to differences in memory management between NPU and GPU. If you're interested in contributing NPU support, we'd be happy to collaborate and review your pull requests!