From 1f16fba6eff0496e7435127befbff22235af700e Mon Sep 17 00:00:00 2001 From: Daniel Wymark Date: Fri, 25 Sep 2026 21:07:56 -0700 Subject: [PATCH] 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..ce09f701a944 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 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 #if GGML_SYCL_DNNL && defined(GGML_SYCL_HAS_BF16)