We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f455e5 commit 9b5ee68Copy full SHA for 9b5ee68
python/sglang/multimodal_gen/runtime/platforms/cuda.py
@@ -124,6 +124,9 @@ def get_available_gpu_memory(
124
if empty_cache:
125
torch.cuda.empty_cache()
126
127
+ if torch.distributed.is_initialized():
128
+ device_id = torch.distributed.get_rank()
129
+
130
device_props = torch.cuda.get_device_properties(device_id)
131
if device_props.is_integrated:
132
free_gpu_memory = psutil.virtual_memory().available
0 commit comments