From dbaf5b7e9e12288828a571247223063a52e801e1 Mon Sep 17 00:00:00 2001 From: aws-patlange <90803007+aws-patlange@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:52:10 -0700 Subject: [PATCH] [Bugfix] Fix assertion in NeuronExecutor (#5841) Signed-off-by: Alvant --- vllm/executor/neuron_executor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vllm/executor/neuron_executor.py b/vllm/executor/neuron_executor.py index c5e2fb0f67736..1a3329749fde8 100644 --- a/vllm/executor/neuron_executor.py +++ b/vllm/executor/neuron_executor.py @@ -48,9 +48,9 @@ def initialize_cache(self, num_gpu_blocks: int, def execute_model( self, execute_model_req: ExecuteModelRequest) -> List[SamplerOutput]: - assert (execute_model_req.blocks_to_swap_in == {} - and execute_model_req.blocks_to_swap_out == {} - and execute_model_req.blocks_to_copy == {}), ( + assert (not execute_model_req.blocks_to_swap_in + and not execute_model_req.blocks_to_swap_out + and not execute_model_req.blocks_to_copy), ( "Cache operations are not supported for Neuron backend.") assert execute_model_req.num_lookahead_slots == 0, ( "lookahead not supported for Neuron backend.")