Repository navigation
weight cache: key daemon paths by GPU UUID - #36101
Conversation
a13d5d8 to
4ed8515
Compare
|
@TarangKhanna Is this PR ready for review yet? Can we limit the scope of the codebase it modifies? |
82793ec to
64ce87b
Compare
@liusy58 Not quite yet. I’m doing one final pass to reduce the diff. The change is broader than just changing the socket key because moving from rank based identity to GPU UUID plus config also means the old rank based ready file can no longer provide the ownership/readiness coordination we need. The new path uses an identity scoped lock for ownership and the socket itself for readiness. I’m trimming the remaining lifecycle and wiring changes to only what’s required to preserve those, then I’ll mark it ready once the diff is tighter. |
Thanks for your contribution. We’d like to keep the scope of the changes as tight as possible. |
I agree. I’ll trim this back to the discovery change and keep the existing startup behavior where possible. The remaining changes will focus on identifying daemons by physical GPU UUID plus cache config, with only the minimal loader wiring needed for that. |
4e83ea9 to
b58f5fc
Compare
Co-authored-by: siyu <liusy58@linux.alibaba.com> Co-authored-by: Alex Nails <alex.nails@radixark.ai>
Daemon paths were keyed only by physical GPU UUID (sgl-project#36101), so only one cache per GPU was addressable. Append a digest of the resolved cache-relevant model/parallel inputs and the TP/PP rank, so caches that differ in quantization, dtype or model version can coexist on a GPU. Existing {device_uuid} template syntax and explicit --weight-cache-socket behavior remain unchanged.
Daemon paths were keyed only by physical GPU UUID (sgl-project#36101), so only one cache per GPU was addressable. Append a digest of the resolved cache-relevant model/parallel inputs and the TP/PP rank, so caches that differ in quantization, dtype or model version can coexist on a GPU. Existing {device_uuid} template syntax and explicit --weight-cache-socket behavior remain unchanged.
Motivation
Weight cache daemon discovery currently uses distributed rank in the Unix socket and ready file paths. Rank is only unique within one distributed job.
Two independent jobs on the same host can therefore both have rank 0 while running on different physical GPUs, allowing one job to discover the other job's daemon.
Change
Use the physical GPU UUID for daemon socket and ready file identity instead of distributed rank.
The existing launcher topology is unchanged. Daemons are still placed using the existing PP and TP local GPU mapping. When cleanup or readiness needs the daemon path, the launcher derives the UUID from that same local GPU id.
The client follows the same rule. If no explicit
weight_cache_socketis configured,IpcModelLoaderderives the daemon socket from the UUID of the GPU it is actually loading onto.Weight compatibility remains separate from discovery. After connecting, the existing
CacheConfigcheck still validates the model and shard configuration, including TP, PP, DP, EP, quantization, dtype, and revision.Scope
This change is limited to node local daemon discovery identity.
Validation
test/registered/unit/model_loader/test_weight_cache_protocol.py: 31 passed.Unit coverage verifies that different physical GPU UUIDs produce different socket and ready paths.
Unit coverage verifies that automatic discovery uses the caller's actual GPU id rather than logical rank or an implicit GPU 0.
Existing static DP and EP compatibility coverage remains passing.
TP1 CUDA end to end validation passed on A40.
TP2 CUDA end to end validation passed on two H100 SXM GPUs, including daemon startup, automatic discovery, CUDA IPC weight import, and generation.
CI States
Latest PR Test (Base): ⏳ Run #33374336440
Latest PR Test (Extra): ⏳ Run #33374336245
Latest PR Test (AMD ROCm 7.2): ⏳ Run #33374336462