For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
copy_pinned_to_destinations
copy_pinned_to_destinations()
max.driver.copy_pinned_to_destinations(source, destinations)
Copies a host buffer into destination buffers safely.
Copies source into each buffer in destinations. When source is
pinned and the destinations span multiple devices, its deferred free is
enqueued only on its owning device’s stream, so the memory manager could
recycle the pinned staging while copies on the other devices’ streams are
still reading it. Making the owning device’s stream wait for the other
destination devices’ streams closes that window. The cross-stream wait is a
no-op for a non-pinned source or a single device.