@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 98700c6105
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 5, 02:15 UTC

Fix #33773: Replace unconditional pandas import with PlaceholderModule (#39990)

Signed-off-by: Netanel Haber <58652339+netanel-haber@users.noreply.github.com>

Netanel Haber committed Apr 16, 2026 at 12:06 UTC 98700c6105b0313d924126cba428219111ee8f6f
1 file changed +6 -1
vllm/_aiter_ops.py
+6 -1
@@ -3,18 +3,23 @@
3 import functools
4 from collections.abc import Callable
5
6 -import pandas as pd
6 import torch
7 from torch._ops import OpOverload
8
9 import vllm.envs as envs
10 from vllm.platforms import current_platform
11 +from vllm.utils.import_utils import PlaceholderModule
12 from vllm.utils.torch_utils import direct_register_custom_op
13 from vllm.v1.attention.ops.rocm_aiter_mla_sparse import (
14 rocm_aiter_sparse_attn_indexer,
15 rocm_aiter_sparse_attn_indexer_fake,
16 )
17
18 +try:
19 + import pandas as pd
20 +except ImportError:
21 + pd = PlaceholderModule("pandas")
22 +
23 # fp8_dtype is not cached.
24 # on ROCm the fp8_dtype always calls is_fp8_fnuz
25 # which is a host op, so we cache it once here.