ggml_op_can_inplace: Check if Operation Can Be Done In-place

View source: R/graph.R

ggml_op_can_inplaceR Documentation

Check if Operation Can Be Done In-place

Description

Returns whether a GGML operation can reuse memory from its source tensors. This is useful for memory optimization.

Usage

ggml_op_can_inplace(op)

Arguments

op

Operation code (integer)

Value

Logical indicating if operation supports in-place execution

See Also

Other graph: ggml_graph_view()

Examples


# Check if operation code 1 (ADD) can be in-place
can_inplace <- ggml_op_can_inplace(1L)


ggmlR documentation built on July 14, 2026, 1:08 a.m.