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).

Mojo function

ep_token_index_offset

def ep_token_index_offset(*, n_ranks: Int, max_tokens_per_rank: Int, msg_bytes: Int) -> Int

Returns where a token_recv receive buffer's token indices start.

Args:

  • โ€‹n_ranks (Int): The number of devices participating in communication.
  • โ€‹max_tokens_per_rank (Int): The maximum number of tokens per rank.
  • โ€‹msg_bytes (Int): The token format's message size.

Returns:

Int: The byte offset past the messages, aligned to a token index.

Was this page helpful?