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
P3PeerSendConfig
struct P3PeerSendConfig
Runtime state for the in-epilogue EP-combine peer scatter-send.
Bundles everything needed to resolve and issue a per-row peer send
directly from the L2 epilogue's SMEM. One struct instead of ~8 separate
new params: write_absolute_with_bounds_check has 3 callers spanning 2
kernel families unrelated to EP-comm (blockwise_fp8_1d2d,
blockwise_fp8_output_writer) that must stay byte-identical, so this
adds exactly one new defaulted param to their call sites, not eight.
recv_count_layout((e, rk)) = e*n_ranks + rk and
recv_buf_layout((src_idx, src_topk, byte_off)) = (src_idx*top_k + src_topk)*msg_bytes + byte_off are the row-major
linear-index formulas EPCombineKernel computes for those coordinate
tuples -- copied here as plain arithmetic rather than threading the full
EPCombineKernel[...] comptime specialization
(num_threads/n_sms/n_experts/max_tokens_per_rank/p2p_world_size), none of
which either formula depends on. Same precedent as this file's own
_stage2_recv_offset_in_bounds, a documented copy of
EPCombineKernel._recv_offset_in_bounds for the identical reason.
disabled() is the default: .unsafe_dangling() pointers (never
dereferenced -- gated behind p3_control >= 0) and 0-valued scalars.
Fields
- atomic_counter (
Pointer[Int32, MutUntrackedOrigin]): - src_info_ptr (
Pointer[Int32, ImmUntrackedOrigin]): - row_base_ptr (
Pointer[UInt64, MutUntrackedOrigin]): - recv_buf_ptrs (
StaticTuple[Pointer[UInt8, MutUntrackedOrigin], Int(8)]): - n_ranks (
Int): - p2p_world_size (
Int): - top_k (
Int): - msg_bytes (
Int): - max_tokens_per_rank (
Int): - my_rank (
Int): - send_mbx (
P5SendMailboxPtr): - send_stamp_ptr (
Pointer[UInt64, MutUntrackedOrigin]): - send_stamp_on (
Int): - trace_ptr (
Pointer[UInt64, MutUntrackedOrigin]): - trace_on (
Int): - send_trace_slot (
Int):
Implemented traits
AnyType,
Copyable,
Deinitable,
ImplicitlyCopyable,
Movable
Methods
disabled
static def disabled() -> Self