From 3e1ad4435f7c205dcbd5b14d1a529cc328b22ce8 Mon Sep 17 00:00:00 2001 From: Wentao Ye <44945378+yewentao256@users.noreply.github.com> Date: Mon, 4 May 2026 12:22:07 -0400 Subject: [PATCH] [Bug] Fix `tests/compile/test_config.py` AttributeError: 'NoneType' object has no attribute 'dtype' (#41288) Signed-off-by: yewentao256 --- vllm/config/vllm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 88e6660e21..52c04509b2 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -1617,7 +1617,7 @@ class VllmConfig: max_size = rocm_aiter_ops.get_aiter_allreduce_max_size() else: max_size = compilation_config.pass_config.flashinfer_max_size(tp_size) - if max_size is not None: + if max_size is not None and self.model_config is not None: assert isinstance(self.model_config.dtype, torch.dtype) max_token_num = max_size // ( self.model_config.get_hidden_size()