Skip to content

Commit

Permalink
Fix early CUDA init via get_architecture_class_name import (vllm-proj…
Browse files Browse the repository at this point in the history
…ect#3770)

Signed-off-by: Lei Wen <[email protected]>
Co-authored-by: Lei Wen <[email protected]>
  • Loading branch information
2 people authored and joerunde committed Apr 11, 2024
1 parent af7097b commit fb1c337
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from vllm.executor.executor_base import ExecutorBase
from vllm.logger import init_logger
from vllm.lora.request import LoRARequest
from vllm.model_executor.model_loader import get_architecture_class_name
from vllm.outputs import RequestOutput
from vllm.sampling_params import SamplingParams
from vllm.sequence import (MultiModalData, SamplerOutput, Sequence,
Expand Down Expand Up @@ -115,6 +114,8 @@ def __init__(

# If usage stat is enabled, collect relevant info.
if is_usage_stats_enabled():
from vllm.model_executor.model_loader import (
get_architecture_class_name)
usage_message.report_usage(
get_architecture_class_name(model_config),
usage_context,
Expand Down

0 comments on commit fb1c337

Please sign in to comment.