[Fix] MM pool GPU alloc with base_gpu_id (#23377)

This commit is contained in:
pure water
2026-06-21 08:51:06 +08:00
committed by GitHub
parent fbbf559de2
commit 5b3eeaf504
2 changed files with 3 additions and 2 deletions
@@ -277,6 +277,7 @@ class BaseMultimodalProcessor(ABC):
self.cudaipc_mmfeature_pool = MmItemMemoryPool(
per_worker_pool_size,
MM_ITEM_MEMORY_POOL_RECYCLE_INTERVAL,
self.server_args.base_gpu_id,
)
def compute_mrope_positions(self, input_ids, mm_items):
@@ -122,9 +122,9 @@ class MmItemMemoryChunk:
class MmItemMemoryPool:
def __init__(self, memory_size, recycle_interval):
def __init__(self, memory_size, recycle_interval, base_gpu_id):
self.memory_pool = torch.empty(
memory_size, dtype=torch.int8, device="cuda"
memory_size, dtype=torch.int8, device=f"cuda:{base_gpu_id}"
).contiguous()
storage = self.memory_pool.untyped_storage()
self._pool_ipc_handle = storage._share_cuda_()