MCPcopy
hub / github.com/InternLM/lmdeploy / create_instance

Method create_instance

lmdeploy/pytorch/engine/engine.py:630–639  ·  view source on GitHub ↗

Create a pytorch engine instance. Args: cuda_stream_id(int): identity of a cuda stream Returns: EngineInstance: an instance of pytorch engine

(self, cuda_stream_id=0)

Source from the content-addressed store, hash-verified

628 raise
629
630 def create_instance(self, cuda_stream_id=0):
631 """Create a pytorch engine instance.
632
633 Args:
634 cuda_stream_id(int): identity of a cuda stream
635 Returns:
636 EngineInstance: an instance of pytorch engine
637 """
638 from .engine_instance import EngineInstance
639 return EngineInstance(self)
640
641 def start_loop(self):
642 """Alias of start, API for AsyncEngine."""

Callers 2

__init__Method · 0.45
_inferenceMethod · 0.45

Calls 1

EngineInstanceClass · 0.85

Tested by

no test coverage detected