In this article
An IPC handle names shared backing; the importing process receives its own usable pointer and owns a mapping rather than the original allocation.
Send the export artifact rather than an address
A parent process allocates a HIP device buffer and sends its numeric pointer to a child. That is not the IPC memory protocol. The HIP device API reference describes exporting an opaque memory handle and opening it in another process. The returned local pointer is the one the importer can use. Equal numeric addresses across test runs would not establish a valid shared mapping or replace the exported handle.
Separate original allocation and imported mapping
Opening a handle creates an importing relationship, not a transfer of original ownership. Closing the imported mapping and freeing the original allocation are different actions. Preserve the exporter’s lifetime until importers have completed access and closed mappings as required by the API. A generic deleter that calls ordinary device free on every pointer is unsuitable if it cannot distinguish owned allocations from imported mappings. Record the pointer’s resource kind alongside its value.
Treat synchronization as another protocol
A mapped buffer can still contain unfinished producer work. A successful import does not itself prove that data are ready, and successful consumer submission does not mean the exporter may overwrite them. Define readiness and final-use acknowledgment independently of handle exchange. The multi-device management guide explains related device and access relationships. Preserve device identity and check supported access instead of inferring interoperability from both processes seeing a GPU.
Inspect the allocation path used by a library
The AITER all-reduce implementation provides a concrete primary example of explicit IPC-related allocation choices. A framework tensor can originate from an allocator with different export assumptions than a plain allocation. Inspect that source and the installed runtime before trying to export arbitrary pointers. The example illustrates an implementation contract, not permission to assume that every tensor or every backend supports identical sharing behavior.
Verify close and owner cleanup separately
Use a bounded two-process fixture with a small identifiable payload and explicit completion messages. Observe local pointer creation, consumer completion, imported-map close and final owner free as separate events. Related guides cover Triton IPC host boundaries and stream dependency design. HIP IPC here is a process-sharing mechanism with platform-specific restrictions, not a network transport or a universal method for pooling the memory of remote GPUs.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.