check whether decode only
(self)
| 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 | """ |
nothing calls this directly
no test coverage detected