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++
native head: report the cudaHostAlloc error, not just "cannot pin N MiB"
Yannick Lothebd9c81c983d
diff --git a/src/core/native_head.cpp b/src/core/native_head.cppindex aee19df00..335fe0778 100644--- a/src/core/native_head.cpp+++ b/src/core/native_head.cpp@@ -136,7 +136,8 @@ bool NativeEmbed::load(const std::vector<std::string>& shards, int64_t n_embd, ireturn false;}strata::platform::advise_willneed(gguf.tensor_data(*t), bytes_); // copied out of the mapping below- if (cudaHostAlloc(&host_, bytes_, cudaHostAllocMapped | cudaHostAllocPortable) != cudaSuccess) {+ cudaError_t host_err = cudaHostAlloc(&host_, bytes_, cudaHostAllocMapped | cudaHostAllocPortable);+ if (host_err != cudaSuccess) {// Under WSL2 the driver's pinned/mapped host budget (~1 GiB) can be spent by the GPU contexts// themselves (three cards). The table is only gathered from, so keep it in the current device's VRAM// instead: it costs its size there and reads faster than over PCIe.@@ -147,7 +148,8 @@ bool NativeEmbed::load(const std::vector<std::string>& shards, int64_t n_embd, icudaMemcpy(d, gguf.tensor_data(*t), bytes_, cudaMemcpyHostToDevice) != cudaSuccess) {if (d) cudaFree(d);cudaGetLastError();- err = "native embedding: cannot pin " + std::to_string(bytes_ >> 20) + " MiB, nor place it in VRAM";+ err = "native embedding: cannot pin " + std::to_string(bytes_ >> 20) + " MiB: " ++ cudaGetErrorString(host_err) + ", nor place it in VRAM";return false;}std::fprintf(stderr, "strata: native embedding: cannot pin %llu MiB, kept in VRAM instead\n",