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
ArgMax
struct ArgMax
Registers the mo.reduce.arg_max graph op with the graph compiler.
Implemented traits
Methods
execute
static def execute[target: StringSpan[ImmStaticOrigin], rank: Int, axis: Int, _trace_name: StringSpan[ImmStaticOrigin]](output: ManagedTensorSlice[IOSpec[_, _].FusedOutput, static_spec=output.static_spec], input: ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=input.static_spec], ctx: DeviceContext)
Executes the mo.reduce.arg_max graph op.
Parameters:
- target (
StringSpan[ImmStaticOrigin]): Compilation target string. - rank (
Int): Tensor rank of the input and output tensors. - axis (
Int): Dimension along which to reduce. - _trace_name (
StringSpan[ImmStaticOrigin]): Name used for tracing and debugging.
Args:
- output (
ManagedTensorSlice[IOSpec[_, _].FusedOutput, static_spec=output.static_spec]): Output tensor receiving the result. - input (
ManagedTensorSlice[IOSpec[_, _].FusedInput, static_spec=input.static_spec]): Input tensor to reduce. - ctx (
DeviceContext): Device context used to enqueue the kernel.
Raises:
Error: If the operation parameters are invalid.