ggml_custom_ops: List Registered Custom Ops

View source: R/custom_ops.R

ggml_custom_opsR Documentation

List Registered Custom Ops

Description

Returns the names of the C kernels currently registered with ggmlR, in registration order. Useful for checking that a downstream package registered its kernels as expected.

Usage

ggml_custom_ops()

Value

Character vector of registered custom op names, empty if none

Built-in kernels

ggmlR registers three kernels at load time. Each one exercises a different path through the custom-op API, and they double as worked examples:

"row_median"

Median of each row. One input; the output shape is chosen by the caller as ne[1] = 1, collapsing the row. Use ne = c(1, nrow) for an n x nrow input.

"row_permute"

out[i] = x[perm[i]] within each row, with perm 0-based. Two inputs: F32 data and an I32 index tensor. Indices outside the row yield 0. This is not ggml_get_rows, which permutes whole rows rather than elements inside one.

"clip_inplace"

Clamps values into [lo, hi], writing into the input. For use with ggml_custom_inplace; the bounds are passed as a 2-element F32 tensor, since a custom node carries no scalar parameters of its own. ggml_clamp does the same thing as a graph op – this kernel exists as the in-place example.

See Also

ggml_custom, ggml_custom_inplace

Examples

ggml_custom_ops()

ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.