Skip to main content

Mojo struct

ReduceScatterConfig

@register_passable(trivial) struct ReduceScatterConfig[dtype: DType, ngpus: Int, simd_width: Int = simd_width_of[dtype, get_gpu_target()](), alignment: Int = align_of[SIMD[dtype, simd_width]](), accum_type: DType = get_accum_type[dtype]()]

Fields

  • stride (Int):
  • part (Int):
  • remainder (Int):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable

comptime members

__copy_ctor_is_trivial

comptime __copy_ctor_is_trivial = True

__del__is_trivial

comptime __del__is_trivial = True

__move_ctor_is_trivial

comptime __move_ctor_is_trivial = True

Methods

__init__

__init__(num_elements: Int, threads_per_gpu: Int) -> Self

rank_start

rank_start(self, rank: Int) -> Int

Returns:

Int

rank_end

rank_end(self, rank: Int) -> Int

Returns:

Int

rank_part

rank_part(self, rank: Int) -> Int

Returns:

Int

thr_local_start

thr_local_start(self, thread_idx: Scalar[DType.uint]) -> Int

Returns:

Int

Was this page helpful?