unilab.base.cpu_runtime.apply_cpu_confinement

unilab.base.cpu_runtime.apply_cpu_confinement(cpu_ids)[source]

Confine this process’s host-side compute to the env-owned CPU block.

Cold path only: call from env construction, before the backend pool or managers exist. None (the single-rank default) is a no-op so the default path keeps default OS scheduling.

Structural validation (non-empty, unique, non-negative ints) is owned by EnvCfg.validate; this function fails closed on CPU ids that are not available to the process.

Parameters:

cpu_ids (Sequence[int] | None)

Return type:

None