unilab.ipc.replay_pipelines.native_h2d

Optional native H2D submit helper with graceful fallback.

Pre-validates build prerequisites before attempting JIT compilation. Falls back to dst.copy_(src, non_blocking=True) on a side stream when the native extension is unavailable — functionally identical for pinned-memory transfers (the ROCm path already uses this).

Functions

ensure_available()

Attempt to load native extension.

submit_h2d(dst, src, stream)

Submit one async H2D copy on an existing CUDA stream.

unilab.ipc.replay_pipelines.native_h2d.is_available()[source]

True if native extension is loaded or loadable.

Return type:

bool

unilab.ipc.replay_pipelines.native_h2d.get_diagnostic()[source]

Human-readable reason for unavailability.

Return type:

str

unilab.ipc.replay_pipelines.native_h2d.ensure_available()[source]

Attempt to load native extension. Returns True if available.

Return type:

bool

unilab.ipc.replay_pipelines.native_h2d.submit_h2d(dst, src, stream)[source]

Submit one async H2D copy on an existing CUDA stream.

Parameters:
Return type:

None