Pin activation offload host buffers via accelerator API
Allocating host buffers with torch.empty_strided(pin_memory=True) bypassed
the accelerator pinning abstraction, so activation offload ignored
DS_PIN_MEMORY_BACKEND and its pins were invisible to DeepSpeed's pinned
memory accounting. Restore already rebuilds the source strides on the device
and copy_ bridges the layout difference, so host buffers can be dense and go
through get_accelerator().pin_memory(). Dense buffers also let sources that
differ only in stride share a pool entry.
Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
Co-authored-by: Cursor <cursoragent@cursor.com>