Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

Merge f-027-gh-eng-d (#3602 #3948 #3638 #3702 #3797 #2409 #3844: audits, fixes and tests)

Niko12219c624c75a976
diff --cc src/core/conversation_state.cpp
index 4bfd47d6f,7fa40ca66..b8ce97016
--- a/src/core/conversation_state.cpp
+++ b/src/core/conversation_state.cpp
@@@ -691,11 -397,10 +691,13 @@@ bool conversation_snapshot_validate(con
return !draft || conversation_kv_validate(image.kv.back(), *draft, g, upto, false, error);
}
+ bool conversation_copy_stream_ready(int device) { return conversation_detail::copy_stream_ready(device); }
+
ConversationRestore conversation_snapshot_restore(const SavedConversation& image, SessionState& ss,
const ModelGeometry& g, const QsaState* draft, std::string& error) {
+ conversation_checkpoint_join(image.live.gdn.data());
+ for (const auto& c : image.checkpoints) conversation_checkpoint_join(c.gdn.data());
+ conversation_park_join_for(image); // (STRATA_PARK_VRAM_MIB: no wait when the K/V comes from its slot)
if (!conversation_snapshot_validate(image, ss, g, draft, error)) return ConversationRestore::invalid;
if (!sync(error)) return ConversationRestore::transfer_failed;
const int64_t upto = (int64_t) image.live.ids.size();
diff --cc src/core/verify.cpp
index 920b55c17,193b8f5ba..1b5e18874
--- a/src/core/verify.cpp
+++ b/src/core/verify.cpp
@@@ -4031,14 -3729,17 +4040,17 @@@ bool Verifier::instantiate_evicting(cud
// #997: every layout of active slots keeps its own graph pair (20-30 MiB each on an L40S), and with an expert cache
// sized to the reserve the next window graph - a batch layout or a one-request window captured on first use - can
// find no VRAM left: free the least recently used layouts until it fits (they are captured again when needed)
- cudaError_t ie = cudaGraphInstantiate(&ex, graph, flags);
+ // (into a local: what a failed instantiate leaves in the output is not specified, and `ex` is a member that
+ // capture() reads as "captured" when it is not null)
+ cudaGraphExec_t got = nullptr;
- cudaError_t ie = cudaGraphInstantiate(&got, graph, 0);
++ cudaError_t ie = cudaGraphInstantiate(&got, graph, flags);
int freed = 0;
for (bool evicted = true; ie == cudaErrorMemoryAllocation && evicted;) {
(void) cudaGetLastError();
if (!evict_batch_graph(key, evicted, err)) return false;
if (evicted) {
++freed;
- ie = cudaGraphInstantiate(&ex, graph, flags);
- ie = cudaGraphInstantiate(&got, graph, 0);
++ ie = cudaGraphInstantiate(&got, graph, flags);
}
}
if (freed > 0)
@@@ -4051,7 -3752,7 +4063,7 @@@
if (!evict_window_graph(keep_t, evicted, err)) return false;
if (evicted) {
++freed_sizes;
- ie = cudaGraphInstantiate(&ex, graph, flags);
- ie = cudaGraphInstantiate(&got, graph, 0);
++ ie = cudaGraphInstantiate(&got, graph, flags);
}
}
if (freed_sizes > 0)
diff --cc src/kernels/cuda/fused_gr.cu
index fe8672989,3811e7824..12c74a5dc
--- a/src/kernels/cuda/fused_gr.cu
+++ b/src/kernels/cuda/fused_gr.cu
@@@ -2,7 -2,7 +2,8 @@@
#include "strata/core/emulate.hpp"
#include "strata/core/sm75_series.hpp"
#include "strata/core/sm120_series.hpp"
+#include "strata/core/defaults_026.hpp"
+ #define STRATA_Q81_FASTMATH_DIV 1 // #3948: the q8_1 tails divide as native_mmvq.cu (--use_fast_math) does, see q8_1_finite.hpp
#include "strata/kernels/q8_1_finite.hpp" // #606: q8_1_ds
#include "strata/core/geometry.hpp"
#include "strata/kernels/fused_gr.hpp"