nyx_external_memory#
Import the GPU buffers Nyx exports into the compute API behind torch, CUDA or HIP.
Nyx exports a buffer as an OS handle (EExternalMemoryHandleType) with its allocation size and the identity of its
GPU (DeviceIdentity). NyxExternalMemoryImporter pairs the compute device with that GPU, imports the handle
through the vendor driver already loaded by torch (ctypes, no package dependency) and wraps the mapped
pointer as a torch tensor through the CUDA array interface, zero copy.
Synchronization is on the CPU: call NyxExternalMemoryImporter.synchronize() after writing and before Nyx
reads; Nyx waits for its own GPU work before returning. Release every imported buffer before Nyx destroys it.
Classes
Imports Nyx's exported buffers into the compute API torch was built for, on the GPU Nyx renders on. |
|
A Nyx buffer mapped into the compute API. |
Exceptions
A compute API call of the import failed. |