rpc : proper handling of data pointers to CPU buffers#21030
rpc : proper handling of data pointers to CPU buffers#21030rgerganov merged 1 commit intoggml-org:masterfrom
Conversation
The compute graph may contain tensors pointing to CPU buffers. In these cases the buffer address is serialized as 0 and sent over the wire. However, the data pointer is serialized as-is and this prevents proper validation on the server side. This patches fixes this by serializing the data pointer as 0 for non-RPC buffers and doing proper validation on the server side. closes: ggml-org#21006
|
@las7 Maybe also take a look as a quick follow-up on the previous patch. |
|
Taking a look |
|
I am the original issue reported. I just applied @rgerganov 's patch to a pull of the latest source code and rebuilt. I can confirm that this change now fixes the issue. |
|
LGTM |
|
Still failing on cross-architecture NVIDIA setup (RTX 5090 Blackwell + RTX 4090 Ada): RPC server side: Client side: Note: Error changed from "invalid tensor: null buffer" to "invalid data ptr" — the PR fixed one check but there appears to be a second issue in cross-architecture setups. Environment: RTX 5090 (compute 12.0) + RTX 4090 (compute 8.9) |
You need to apply the patch and rebuild both client and server sides. I suspect you only patched |
Sorry about that, confirmed working |
|
@ggml-org/maintainers fyi, this is good to go but needs a second approval |
The compute graph may contain tensors pointing to CPU buffers. In these cases the buffer address is serialized as 0 and sent over the wire. However, the data pointer is serialized as-is and this prevents proper validation on the server side. This patches fixes this by serializing the data pointer as 0 for non-RPC buffers and doing proper validation on the server side.
closes: #21006