Skip to content

vllm_omni.platforms.npu.graph_tools

Reusable exact-signature NPUGraph capture and replay helpers.

logger module-attribute

logger = init_logger(__name__)

CapturedDeviceGraph dataclass

graph instance-attribute

graph: _ReplayGraph

static_inputs instance-attribute

static_inputs: tuple[Tensor, ...]

static_outputs instance-attribute

static_outputs: tuple[Tensor, ...]

replay

replay(inputs: tuple[Tensor, ...]) -> tuple[Tensor, ...]

NPUExactGraphRunner

Capture and replay tensor-only functions for exact NPU signatures.

component_name instance-attribute

component_name = component_name

disable_config_hint instance-attribute

disable_config_hint = disable_config_hint

max_graphs instance-attribute

max_graphs = max(0, int(max_graphs))

stats property

stats: dict[str, int]

capture

capture(
    inputs: tuple[Tensor, ...],
    compute: Callable[..., tuple[Tensor, ...]],
) -> CapturedDeviceGraph

is_supported staticmethod

is_supported() -> bool

run

run(
    operation: str,
    inputs: tuple[Tensor, ...],
    constants: tuple[object, ...],
    compute: Callable[..., tuple[Tensor, ...]],
) -> tuple[Tensor, ...]