llama.cpp icon indicating copy to clipboard operation
llama.cpp copied to clipboard

make `ggml_is_view_op` public.

Open foldl opened this issue 5 days ago • 1 comments

Motivation: ggml_is_view_op is a useful API.

Use case 1

It is used by test-backend-ops.cpp.

Use case 2

https://github.com/ggml-org/llama.cpp/blob/73e2ed3ce3492d3ed70193dd09ae8aa44779651d/src/llama.cpp#L8178-L8179

Let's say cur is a view operation and its source is on another backend, then this would be problematic. if (ggml_backend_supports_op(backend.get(), cur) && !ggml_is_view_op(cur->op)) seems better.

By the way, PR #10825 is useful for checking (visualizing) these scenarios.

foldl avatar Feb 18 '25 01:02 foldl