Skip to content

Commit 0b58149

Browse files
committed
free ray put
1 parent c755342 commit 0b58149

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lmdeploy/pytorch/engine/executor/ray_executor.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ async def forward_async(self, inputs):
433433
outs = self.dag.execute(inputs)
434434
ray.get(outs)
435435

436+
# free ray.put inputs
437+
try:
438+
ray._private.internal_api.free(inputs)
439+
except Exception as e:
440+
logger.warning(f'Free input ref failed: {e}')
441+
436442
async def get_output_async(self):
437443
"""Get output async."""
438444
return await self.remote_outs.get()

0 commit comments

Comments
 (0)