| ggml_custom_ops | R Documentation |
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.
ggml_custom_ops()
Character vector of registered custom op names, empty if none
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.
ggml_custom, ggml_custom_inplace
ggml_custom_ops()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.