ggml
ggml copied to clipboard
ggml : remove `src0` and `src1` from `ggml_tensor` and rename `opt` to `src`
https://github.com/ggerganov/ggml/blob/b98cd8689f74ed69432323ef5a15369d96086ae1/include/ggml/ggml.h#L415-L420
I would suggest considering using an array for all src
nodes instead. This will simplify the code when we need to look at the list of parents of a node. This already happens when printing to dot, internally in ggml-cuda, and will also happen when we implement the improved memory management. Having each parent in a different variable forces us to look at each one separately instead of just looping over an array.
I updated the issue
How would the new src
indexing work in cases where a 4D tensor is created, but opt[0-2]
is being written? It would be out of bounds. for ex: https://github.com/ggerganov/ggml/blob/master/src/ggml.c#L7268
@nullhook I am not sure if I understand what you mean, the total number of source tensors available to ops will be the same, and can be increased as needed.
For instance, see how it is being done in https://github.com/ggerganov/ggml/pull/346: https://github.com/ggerganov/ggml/blob/b7fd1a4cf637ac747796403c7e2c6209b397c4af/src/ggml.c#L7260-L7266
I was looking at the PR linked to this issue. So it seems like GGML_MAX_OPT needed to be increased
Fixed via https://github.com/ggerganov/llama.cpp/pull/2178