]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
fix softmax for iGPU (llama/17838)
authorNeo Zhang Jianyu <redacted>
Wed, 10 Dec 2025 08:59:57 +0000 (16:59 +0800)
committerGeorgi Gerganov <redacted>
Thu, 11 Dec 2025 13:33:00 +0000 (15:33 +0200)
src/ggml-sycl/softmax.cpp

index 83b7c71b66194058f4753e5fb6c47e73aedb0e4c..b41124acc1399e655c112cec449f80bc60cb99cd 100644 (file)
@@ -277,7 +277,7 @@ static void soft_max_f32_sycl(const float *x, const T *mask,
     const int id       = get_current_device_id();
     const size_t smpbo = ggml_sycl_info().devices[id].smpbo;
 
-    if (nbytes_shared <= smpbo) {
+    if (nbytes_shared <= smpbo && ncols_x <= max_block_size) {
         launch_soft_max_kernels<32, 64, 128, 256, 512, 1024, 2048, 4096>(
             x, mask, sinks, dst, params, stream, block_dims, block_nums,
             nbytes_shared);