MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / only_decode

Method only_decode

fastdeploy/worker/gpu_model_runner.py:374–392  ·  view source on GitHub ↗

check whether decode only

(self)

Source from the content-addressed store, hash-verified

372 return dist_out
373
374 def only_decode(self):
375 """
376 check whether decode only
377 """
378 # Update Batch type for cuda graph for if_only_decode
379 if_only_decode = True
380 prefill_exists = None
381 # mix ep in single node
382 if self.fd_config.parallel_config.use_ep and self.fd_config.scheduler_config.splitwise_role == "mixed":
383 only_decode_batch_list = []
384 prefill_exists = self.exist_prefill()
385 paddle.distributed.all_gather_object(only_decode_batch_list, not prefill_exists)
386 if_only_decode = all(only_decode_batch_list)
387
388 if_only_decode = if_only_decode and not (
389 prefill_exists if prefill_exists is not None else self.exist_prefill()
390 )
391
392 return if_only_decode
393
394 def _init_speculative_proposer(self):
395 """

Callers

nothing calls this directly

Calls 1

exist_prefillMethod · 0.95

Tested by

no test coverage detected