File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2725,9 +2725,9 @@ struct ggml_context_container {
2725
2725
//
2726
2726
2727
2727
enum ggml_task_type {
2728
- GGML_TASK_INIT = 1 ,
2729
- GGML_TASK_COMPUTE = 2 ,
2730
- GGML_TASK_FINALIZE = 4 ,
2728
+ GGML_TASK_INIT = 0 ,
2729
+ GGML_TASK_COMPUTE ,
2730
+ GGML_TASK_FINALIZE ,
2731
2731
};
2732
2732
2733
2733
struct ggml_compute_params {
@@ -9260,13 +9260,14 @@ static void ggml_graph_compute_thread(void * data) {
9260
9260
int type = state -> params .type ;
9261
9261
if (state -> node ) {
9262
9262
if (state -> params .ith < state -> params .nth ) {
9263
- if (type & GGML_TASK_INIT )
9263
+ if (type == GGML_TASK_INIT )
9264
9264
{
9265
9265
state -> params .type = GGML_TASK_INIT ;
9266
9266
ggml_compute_forward (& state -> params , state -> node );
9267
+ type = GGML_TASK_COMPUTE ;
9267
9268
}
9268
9269
9269
- if (type & GGML_TASK_COMPUTE )
9270
+ if (type == GGML_TASK_COMPUTE )
9270
9271
{
9271
9272
state -> params .type = GGML_TASK_COMPUTE ;
9272
9273
ggml_compute_forward (& state -> params , state -> node );
@@ -9579,7 +9580,7 @@ void ggml_graph_compute(struct ggml_context * ctx, struct ggml_cgraph * cgraph)
9579
9580
continue ;
9580
9581
9581
9582
workers [next_task ].params = (struct ggml_compute_params ) {
9582
- .type = GGML_TASK_COMPUTE | GGML_TASK_INIT ,
9583
+ .type = GGML_TASK_INIT ,
9583
9584
.ith = 0 ,
9584
9585
.nth = 1 ,
9585
9586
.wsize = 0 ,
You can’t perform that action at this time.
0 commit comments