Skip to content

vllm_omni.platforms.npu.worker.base

Base NPU worker class for vLLM-Omni with OmniProfiler support.

OmniNPUWorkerBase

Bases: NPUWorker

Base NPU worker for vLLM-Omni with OmniProfiler support.

This class replaces vllm-ascend's profiler with OmniProfiler for unified profiling across all platforms.

profiler instance-attribute

profiler = create_omni_profiler(
    profiler_config=profiler_config,
    worker_name=worker_name,
    local_rank=local_rank,
)

profile

profile(
    is_start: bool = True, profile_prefix: str | None = None
)

Override to set trace filename before starting the profiler.

NPUWorker's profile() accepts profile_prefix, so we use it to generate a descriptive trace filename for OmniProfiler.