IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

dcp_rank_tensor

dcp_rank_tensor()​

max.nn.common_layers.context_parallel.dcp_rank_tensor(mesh, dcp)

source

Returns each device’s DCP rank as an int32 [1] device tensor.

The indexer and its top-k merge read the rank on the device; the KV stores take it as a host scalar instead (dcp_ranks()).

Parameters:

Return type:

Tensor