NyxExternalMemoryImporter#

class gs_nyx.nyx_external_memory.NyxExternalMemoryImporter[source]#

Bases: object

Imports Nyx’s exported buffers into the compute API torch was built for, on the GPU Nyx renders on.

Build one with create() from the DeviceIdentity and EExternalMemoryHandleType Nyx reports, import every exported buffer with import_buffer(), release the buffers then close() the importer before Nyx shuts down.

Constructors

Methods

close

Release the compute context.

create

Pick the compute API from the torch build and the compute device matching Nyx's DeviceIdentity.

import_buffer

Import a buffer exported by Nyx (an object with handle, allocationSize and size).

synchronize

Wait for every compute write on the device, so Nyx can read the buffers.