From 02e2c91d0109216cf12068eb34f3dc9c03f4f516 Mon Sep 17 00:00:00 2001 From: Oleksandr Kuvshynov <661042+okuvshynov@users.noreply.github.com> Date: Fri, 24 May 2024 09:52:28 -0400 Subject: [PATCH] correct split id --- Makefile | 2 +- examples/duo/duo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 241369648..9e71b6a05 100644 --- a/Makefile +++ b/Makefile @@ -777,7 +777,7 @@ simple: examples/simple/simple.cpp ggml.o llama.o $(C $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) -simple: examples/duo/duo.cpp ggml.o llama.o $(COMMON_DEPS) $(OBJS) +duo: examples/duo/duo.cpp ggml.o llama.o $(COMMON_DEPS) $(OBJS) $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) diff --git a/examples/duo/duo.cpp b/examples/duo/duo.cpp index 1250db018..ab66bcd0f 100644 --- a/examples/duo/duo.cpp +++ b/examples/duo/duo.cpp @@ -59,7 +59,7 @@ static void split_done_cb(int split) if (split == 1 || split == 2) { std::lock_guard guard(spec_ctx.mtx); - spec_ctx.active_id = 2 - split; + spec_ctx.active_id = split - 1; } } @@ -387,4 +387,4 @@ int main(int argc, char ** argv) { llama_backend_free(); return 0; -} \ No newline at end of file +}