From 383be6713ea82f8e5e711df8b7bc492c74190c4a Mon Sep 17 00:00:00 2001 From: Daniel Wymark Date: Fri, 25 Sep 2026 18:23:00 -0700 Subject: [PATCH 1/2] sycl: dequantize PTQ1_0 and PQ2_0 prompt batches to FP16 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01DSrpF2XYi9dav1e3hSAkaS --- ggml/src/ggml-sycl/ggml-sycl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cpp index 761b7f9c664d..77d8cd640207 100644 --- a/ggml/src/ggml-sycl/ggml-sycl.cpp +++ b/ggml/src/ggml-sycl/ggml-sycl.cpp @@ -2682,7 +2682,8 @@ inline void ggml_sycl_op_mul_mat_sycl( #ifdef GGML_SYCL_F16 bool use_fp16 = true; // TODO(Yu) SYCL capability check #else - bool use_fp16 = false; + // ternary types have no MMQ path and their weights are exact in FP16, so use the FP16 GEMM + bool use_fp16 = src0->type == GGML_TYPE_PQ2_0 || src0->type == GGML_TYPE_PTQ1_0; #endif #if GGML_SYCL_DNNL && defined(GGML_SYCL_HAS_BF16) From bd26f012943b43a6d58278e71bfc687f996e7330 Mon Sep 17 00:00:00 2001 From: Daniel Wymark Date: Fri, 25 Sep 2026 20:59:39 -0700 Subject: [PATCH 2/2] sycl: state the FP16 prompt GEMM rationale in the comment Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01DSrpF2XYi9dav1e3hSAkaS --- ggml/src/ggml-sycl/ggml-sycl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-sycl/ggml-sycl.cpp b/ggml/src/ggml-sycl/ggml-sycl.cpp index 77d8cd640207..ce09f701a944 100644 --- a/ggml/src/ggml-sycl/ggml-sycl.cpp +++ b/ggml/src/ggml-sycl/ggml-sycl.cpp @@ -2682,7 +2682,7 @@ inline void ggml_sycl_op_mul_mat_sycl( #ifdef GGML_SYCL_F16 bool use_fp16 = true; // TODO(Yu) SYCL capability check #else - // ternary types have no MMQ path and their weights are exact in FP16, so use the FP16 GEMM + // ternary weights are exact in FP16 and the FP16 GEMM is much faster than FP32 bool use_fp16 = src0->type == GGML_TYPE_PQ2_0 || src0->type == GGML_TYPE_PTQ1_0; #endif