[Diffusion] Make no-AllGather host weight cache automatic

Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Hongsheng Liu committed 2026-08-19 11:23:36 +08:00
1 parent 3bb7547a0f
commit 010b3c1d74
12 files changed
+62 -71

No files matched your search

+4 -11
View File
@@ -708,11 +708,6 @@ class OmniDiffusionConfig:
# This avoids AllGather synchronization, while host memory follows the
# loader's existing rank-local layout instead of adding a second DP shard.
dlo_use_allgather: bool = True
# Build or join a node-local mmap cache after ordinary loading. This is
# used when direct checkpoint mmap is unavailable, or when direct CUDA
# registration requires a transform-complete final layout. The first
# version is no-AllGather only.
dlo_enable_host_weight_cache: bool = False
# Shared local-disk root. None selects ~/.cache/vllm-omni/dlo-host-weights.
dlo_host_weight_cache_dir: str | None = None
# Maximum wait for the per-layout POSIX writer lock.
@@ -952,12 +947,10 @@ class OmniDiffusionConfig:
raise ValueError("dlo_host_weight_cache_lock_timeout must be positive")
if not math.isfinite(self.dlo_host_weight_cache_pin_limit_gib) or self.dlo_host_weight_cache_pin_limit_gib < 0:
raise ValueError("dlo_host_weight_cache_pin_limit_gib must be non-negative")
if self.dlo_enable_host_weight_cache and not self.enable_distributed_layerwise_offload:
raise ValueError("dlo_enable_host_weight_cache requires distributed layerwise offload")
if self.dlo_enable_host_weight_cache and self.dlo_use_allgather:
raise ValueError("dlo_enable_host_weight_cache currently requires dlo_use_allgather=False")
if self.dlo_host_weight_cache_pin_limit_gib and not self.dlo_enable_host_weight_cache:
raise ValueError("dlo_host_weight_cache_pin_limit_gib requires dlo_enable_host_weight_cache=True")
if self.dlo_host_weight_cache_pin_limit_gib and (
not self.enable_distributed_layerwise_offload or self.dlo_use_allgather
):
raise ValueError("dlo_host_weight_cache_pin_limit_gib requires no-AllGather distributed layerwise offload")
if self.diffusion_compile_granularity not in {"regional", "full"}:
raise ValueError(
"diffusion_compile_granularity must be 'regional' or 'full', "