ggerganov / ggml

Tensor library for machine learning
MIT License
11.26k stars 1.05k forks source link

ggml-alloc : remove buffer_id from leaf_alloc #987

Closed danbev closed 1 month ago

danbev commented 1 month ago

This commit removes the buffer_id field from the leaf_alloc struct.

The motivation for is that this field is only written to and never read/used as far as I can tell. Each tensor_alloc has a buffer_id field and this is what caused me to look into this more closely, to understand what the buffer_id in leaf_alloc was used for.

slaren commented 1 month ago

Yes this is correct. At some point buffer_id was moved to tensor_alloc from node_alloc and leaf_alloc, but leaf_alloc was not updated.