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

AllReduceTuningConfig

struct AllReduceTuningConfig

Parameters: ngpus: Number of GPUs for running allreduce. num_bytes: Total number of input bytes supported by the config. sm_version: SM version (as string). num_blocks: Number of thread blocks for running allreduce. allreduce_num_blocks: Thread blocks for the plain allreduce only, or None to use num_blocks. The fused collectives that read this table keep num_blocks.

Fields​

  • ​ngpus (Int):
  • ​num_bytes (Int):
  • ​sm_version (StaticString):
  • ​num_blocks (Int):
  • ​algorithm (AllReduceAlgorithm):
  • ​allreduce_num_blocks (OptionalReg[Int]):

Implemented traits​

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

Methods​

__init__​

def __init__(*, ngpus: Int, num_bytes: Int, sm_version: StaticString, num_blocks: Int, algorithm: AllReduceAlgorithm, allreduce_num_blocks: OptionalReg[Int] = None) -> Self

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?