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

RoutedRowsRMSNorm

struct RoutedRowsRMSNorm

Registers the norm.routed_rows_rms_norm graph op.

Implemented traits​

AnyType, Deinitable, Movable

Methods​

execute​

static def execute(output: T, input: T, weight: T, expert_offsets: T, eps: Float32, ctx: DeviceContext)

Normalizes the rows below the last expert offset.

Args:

  • ​output (T): The normalized rows [rows, hidden].
  • ​input (T): The expert outputs [rows, hidden].
  • ​weight (T): The input scale weight [hidden].
  • ​expert_offsets (T): The dispatch's per-expert row offsets; the last one is the routed row count.
  • ​eps (Float32): The norm's epsilon.
  • ​ctx (DeviceContext): Device context.

Raises:

Error: If the launch fails.

Was this page helpful?