From 56929b995f33ce9799861050942ceb24946d7560 Mon Sep 17 00:00:00 2001 From: Skyrion9 Date: Tue, 14 Jul 2026 22:35:39 +0300 Subject: [PATCH] fix: segmentation fault on Vulkan (gfx1031 radv) -calling prefill_fast causes segmentation faults in Archlinux. -reproducible by loading any layers to GPU on latest Vulkan/radv as of this commit. YMMV between different architextures on driver versions. -0 layers on GPU or compiling for CPU backend fixes this. --- src/s2_generate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/s2_generate.cpp b/src/s2_generate.cpp index 6ee4c83..5ec059d 100755 --- a/src/s2_generate.cpp +++ b/src/s2_generate.cpp @@ -48,7 +48,8 @@ GenerateResult generate( std::cout << "[Generate] Prefilling " << prompt.cols << " tokens..." << std::endl; } const auto prefill_t0 = std::chrono::steady_clock::now(); - if (!model.prefill_fast(prompt_tm, prompt.cols, params.n_threads, state)) { + // using prefill_fast causes segfault on vulkan with specific architectures (RDNA2 radv gfx 1031) + if (!model.prefill(prompt_tm, prompt.cols, params.n_threads, state)) { std::cerr << "[Generate] Prefill failed." << std::endl; return out; }