For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
ReduceGroupNorm
struct ReduceGroupNorm
Registers the mo.reduce.group_norm graph op with the graph compiler.
Implemented traitsβ
Methodsβ
executeβ
static def execute[dtype: DType, rank: Int, target: StringSlice[ImmStaticOrigin]](output: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=output.static_spec], input: ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=input.static_spec], gamma: ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=gamma.static_spec], beta: ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=beta.static_spec], epsilon: Float32, num_groups: Int32, ctx: DeviceContext)
Executes the mo.reduce.group_norm graph op.
Parameters:
- βdtype (
DType): Element type of the input and output tensors. - βrank (
Int): Tensor rank of the input and output tensors. - βtarget (
StringSlice[ImmStaticOrigin]): Compilation target string.
Args:
- βoutput (
ManagedTensorSlice[IOSpec[_, _].Output, static_spec=output.static_spec]): Output tensor receiving the result. - βinput (
ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=input.static_spec]): Input tensor to reduce. - βgamma (
ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=gamma.static_spec]): Per-column scale weights. - βbeta (
ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=beta.static_spec]): Per-column shift weights. - βepsilon (
Float32): Small constant for numerical stability. - βnum_groups (
Int32): Number of groups for group normalization. - βctx (
DeviceContext): Device context used to enqueue the kernel.
Raises:
Error: If the operation parameters are invalid.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!