Skip to content

Commit 8d8d54f

Browse files
committed
ggml : skip nops in compute_forward
1 parent 6a30bf3 commit 8d8d54f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16602,6 +16602,10 @@ static void ggml_compute_forward_cross_entropy_loss_back(
1660216602
static void ggml_compute_forward(struct ggml_compute_params * params, struct ggml_tensor * tensor) {
1660316603
GGML_ASSERT(params);
1660416604

16605+
if (tensor->op == GGML_OP_NONE) {
16606+
return;
16607+
}
16608+
1660516609
#ifdef GGML_USE_CUBLAS
1660616610
bool skip_cpu = ggml_cuda_compute_forward(params, tensor);
1660716611
if (skip_cpu) {

0 commit comments

Comments
 (0)