ggml_test_backend_ops: Compare Backend Operations Against the CPU
Description
Runs each supported operation on backend and on the CPU with identical
inputs, and reports the normalized mean squared error between the two. This is
the differential test used to find operations whose accelerated implementation
disagrees with the reference one.
Usage
ggml_test_backend_ops(backend, filter = NULL)
Value
A data frame with columns op, nmse and note.
nmse is NA when the case could not be run, and note
then says why.
Arguments
backend
Backend pointer, e.g. from ggml_vulkan_init(0). Compared
against a freshly created CPU backend.
filter
Optional substring; only operations whose name contains it are
run. NULL (default) runs all of them.
Details
Each case is executed three times against the same allocated graph and the
final run is the one compared, so faults that only appear when a graph is
re-executed are visible. That matters: both backend defects found in this
package so far were of that kind -- the first run was exact and later ones
were not.