Skip to main content

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.

Fields​

  • ​ngpus (Int):
  • ​num_bytes (Int):
  • ​sm_version (StaticString):
  • ​num_blocks (Int):
  • ​use_2stage (Bool):

Implemented traits​

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

Methods​

get_num_blocks​

get_num_blocks(self) -> Int

Returns:

Int

get_num_bytes​

get_num_bytes(self) -> Int

Returns:

Int

get_sm_version​

get_sm_version(self) -> StaticString

Returns:

StaticString

get_ngpus​

get_ngpus(self) -> Int

Returns:

Int

get_use_2stage​

get_use_2stage(self) -> Bool

Returns:

Bool

write_to​

write_to(self, mut writer: T)

Writes the tuning config as a string.

Args:

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