For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
dispatch_finish
dispatch_finish()
max.nn.ep.dispatch_finish(config, buffers, tokens, *, layer_idx=None)
Waits for each device’s dispatch that dispatch_start() launched.
Each device gets its own copy of the grouped matmul bounds, built right
after its wait, where the legacy EPBatchManager.ep_dispatch_wait
builds it.
-
Parameters:
-
- config (EPConfig) – The expert-parallel configuration.
- buffers (EPBuffers) – The exchange’s buffers.
- tokens (Tensor) – The tokens that were dispatched, which give each device’s token count.
- layer_idx (Tensor | None) – As for
dispatch(). The wait adds to the tally.
-
Returns:
-
As
dispatch(). -
Raises:
-
ValueError – If
check_supported()rejectsconfig, ifconfigquantizes NVFP4 with per-token global scales, which onlydispatch()sends, or ifconfigcounts expert load withoutlayer_idxor withoutEPBuffers.expert_load. -
Return type: