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 struct

RelayTuningConfig

struct RelayTuningConfig

Tuning-table entry for a relay-assisted grouped collective.

Fields​

  • ​group_size (Int): Group width the entry targets, or -1 for the default entry. CommTuningConfig calls this dimension ngpus, but the relay tables are keyed on the width of one group rather than on the size of the world, so get_ngpus reports this field.
  • ​num_bytes (Int): Largest per-GPU shard, or partition, the entry covers; -1 for the default entry.
  • ​num_blocks (Int): Blocks taking the direct role.
  • ​num_relay_blocks (Int): Blocks taking the relay role.
  • ​relay_percent (Int): Percent of every shard, or of every destination's partition, routed through the other group. Zero declines the relay path, leaving the plain grouped copy.

Implemented traits​

AnyType, CommTuningConfig, Copyable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable, TuningConfig, Writable

Methods​

get_num_blocks​

def get_num_blocks(self) -> Int

Returns:

Int

get_num_bytes​

def get_num_bytes(self) -> Int

Returns:

Int

get_sm_version​

def get_sm_version(self) -> StaticString

Returns:

StaticString

get_ngpus​

def get_ngpus(self) -> Int

Returns:

Int

write_to​

def write_to(self, mut writer: T)

Writes the tuning config as a string.

Args:

  • ​writer (T): The writer to write to.

Was this page helpful?