pyrtc.streams

pyshmem-backed stream policy for pyrtc.

Shared-memory transport itself is provided by the pyshmem package; this module holds the pyrtc-side policy for creating and attaching to streams, plus the config-driven planning of which output streams a system implies.

Module Attributes

TORCH_AVAILABLE

Whether PyTorch imports; None until gpu_torch_available() first probes it.

STREAM_NOTIFY_ENV

Environment variable that overrides the default of stream_notify_default().

Functions

clear_shms(names)

Destroy the named pyshmem streams, ignoring ones that do not exist.

create_stream(name, shape, dtype[, ...])

Create the pyshmem stream backing a component output.

expected_output_shm_specs_for_config(system_conf)

expected_output_shms_for_config(system_conf)

Return the known output stream names implied by a validated config.

gpu_torch_available()

Return whether PyTorch is importable, importing it on the first call.

normalize_gpu_device(gpu_device[, context])

open_stream(name[, gpu_device, readonly])

Attach to an existing pyshmem stream.

reconcile_expected_output_shms(system_conf, *)

stream_notify_default()

Return whether new streams are created with pyshmem notify=True.