Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cd60b88

Browse files
danbevggerganov
authored andcommitted
ggml-alloc : remove buffer_id from leaf_alloc (ggml/987)
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.
1 parent becfd38 commit cd60b88

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

‎ggml/src/ggml-alloc.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ struct tensor_alloc {
348348
};
349349

350350
struct leaf_alloc {
351-
int buffer_id;
352351
struct tensor_alloc leaf;
353352
};
354353

@@ -740,7 +739,6 @@ bool ggml_gallocr_reserve_n(ggml_gallocr_t galloc, struct ggml_cgraph * graph, c
740739
for (int i = 0; i < graph->n_leafs; i++) {
741740
struct ggml_tensor * leaf = graph->leafs[i];
742741
struct hash_node * hn = ggml_gallocr_hash_get(galloc, leaf);
743-
galloc->leaf_allocs[i].buffer_id = hn->buffer_id;
744742
if (leaf->view_src || leaf->data) {
745743
galloc->leaf_allocs[i].leaf.buffer_id = -1;
746744
galloc->leaf_allocs[i].leaf.offset = SIZE_MAX;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /