File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1041,7 +1041,7 @@ struct GGMLRunner {
1041
1041
}
1042
1042
1043
1043
struct ggml_gallocr * ggml_gallocr_new_n_multi (ggml_backend_buffer_type_t * bufts, int n_bufs) {
1044
- struct ggml_gallocr * galloc = (ggml_gallocr_t )calloc (1 , sizeof (struct ggml_gallocr ));
1044
+ struct ggml_gallocr * galloc = (struct ggml_gallocr * )calloc (1 , sizeof (struct ggml_gallocr ));
1045
1045
GGML_ASSERT (galloc != NULL );
1046
1046
1047
1047
galloc->bufts = calloc (n_bufs, sizeof (ggml_backend_buffer_type_t ));
@@ -1089,8 +1089,8 @@ struct ggml_gallocr * ggml_gallocr_new_n_multi(ggml_backend_buffer_type_t * buft
1089
1089
1090
1090
int total_n_half = (n_nodes + n_leafs) / 2 ;
1091
1091
1092
- int node_buffer_ids[ n_nodes] ;
1093
- int leaf_buffer_ids[ n_leafs] ;
1092
+ int * node_buffer_ids = ( int *) calloc ( n_nodes, sizeof ( int )) ;
1093
+ int * leaf_buffer_ids = ( int *) calloc ( n_leafs, sizeof ( int )) ;
1094
1094
1095
1095
for (int i = 0 ; i < n_nodes; i++) {
1096
1096
node_buffer_ids[i] = i < total_n_half ? 0 : 1 ;
You can’t perform that action at this time.
0 commit comments