aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSpencer Sutton <spencersutton@users.noreply.github.com>2023-07-11 12:31:10 -0400
committerGitHub <noreply@github.com>2023-07-11 19:31:10 +0300
commit5bf2a2771886ee86137e01dbc7492f78fb392066 (patch)
tree740fd968318c00cfc4c001365f42d4e2cdc7f760 /examples
parentc9c74b4e3f9dcfab8b0032749ff8a579ab4e4d8d (diff)
ggml : remove src0 and src1 from ggml_tensor and rename opt to src (#2178)
* Add ggml changes * Update train-text-from-scratch for change * mpi : adapt to new ggml_tensor->src --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/train-text-from-scratch/train-text-from-scratch.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/examples/train-text-from-scratch/train-text-from-scratch.cpp b/examples/train-text-from-scratch/train-text-from-scratch.cpp
index b96fdcd..afbb4a7 100644
--- a/examples/train-text-from-scratch/train-text-from-scratch.cpp
+++ b/examples/train-text-from-scratch/train-text-from-scratch.cpp
@@ -1354,17 +1354,9 @@ struct ggml_tensor * expand(struct ggml_cgraph * g, struct ggml_tensor * t) {
}
}
- if (t->src0) {
- expand(g, t->src0);
- }
-
- if (t->src1) {
- expand(g, t->src1);
- }
-
- for (int i = 0; i < GGML_MAX_OPT; ++i) {
- if (t->opt[i]) {
- expand(g, t->opt[i]);
+ for (int i = 0; i < GGML_MAX_SRC; ++i) {
+ if (t->src[i]) {
+ expand(g, t->src[i]);
}
}