Skip to content

Backend init_tensor Behaviour #14479

Answered by slaren
taronaeo asked this question in Q&A
Jul 1, 2025 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

All tensors go through the init_tensor function of the buffer in which they are allocated. If you found a case where that doesn't happen, it would be a bug. One possibility is that the supports_buft function of your backend is not properly setup, and you are receiving tensors from a different buffer type.

If I were to turn on support for that, it would mean requiring to support all operations that came before it as well, including GGML_OP_RMS_NORM, which we do not have support at all.

This is not accurate, ggml_backend_sched schedules each operation to a backend that can run it, and it ensures that the tensors are copied to a buffer type that is supported by the backend.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@slaren
Comment options

@taronaeo
Comment options

@slaren
Comment options

@taronaeo
Comment options

@slaren
Comment options

Answer selected by taronaeo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants