Skip to content

Commit e2349ec

Browse files
committed
sync : update graph copies to new ggml API
1 parent 16e819d commit e2349ec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/finetune/finetune.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static struct ggml_tensor * llama_build_lora_finetune_graphs(
772772
if (enable_checkpointing) {
773773
ggml_build_backward_gradient_checkpointing(ctx, gf, gb, gb_tmp, checkpoints.data(), (int) checkpoints.size());
774774
} else {
775-
*gb = *gf;
775+
ggml_graph_cpy(gf, gb);
776776
ggml_build_backward_expand(ctx, gf, gb, true);
777777
}
778778

examples/train-text-from-scratch/train-text-from-scratch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ static struct ggml_tensor * llama_build_train_graphs(
436436
if (enable_checkpointing) {
437437
ggml_build_backward_gradient_checkpointing(ctx, gf, gb, gb_tmp, checkpoints.data(), (int) checkpoints.size());
438438
} else {
439-
*gb = *gf;
439+
ggml_graph_cpy(gf, gb);
440440
ggml_build_backward_expand(ctx, gf, gb, true);
441441
}
442442

0 commit comments

Comments
 (0)