[Bugfix] Fix assertion in NeuronExecutor (#5841)

This commit is contained in:
aws-patlange 2024-06-25 19:52:10 -07:00 committed by GitHub
parent c2a8ac75e0
commit 82079729cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,9 +48,9 @@ class NeuronExecutor(ExecutorBase):
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.")