From 339f3242c761f16c27e5ffcde1d35dcc31933a55 Mon Sep 17 00:00:00 2001 From: Ben Ashbaugh Date: Tue, 20 Oct 2026 17:19:08 -0700 Subject: [PATCH] opencl: fix rope program build error with newer Clang (#30893) Newer versions of Clang diagnose an incompatible pointer type error when assigning a pointer to float to a pointer to half. --- ggml/src/ggml-opencl/kernels/rope.cl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml-opencl/kernels/rope.cl b/ggml/src/ggml-opencl/kernels/rope.cl index 27fdbbbc4..5b99d42de 100644 --- a/ggml/src/ggml-opencl/kernels/rope.cl +++ b/ggml/src/ggml-opencl/kernels/rope.cl @@ -520,7 +520,7 @@ kernel void kernel_rope_multi_f16( src0 = (global void*)((global char*)src0 + offset0); src1 = (global int*)((global char*)src1 + offset1); src2 = (global float*)((global char*)src2 + offset2); - dst = (global float*)((global char*)dst + offsetd); + dst = (global half*)((global char*)dst + offsetd); int i3 = get_group_id(2); int i2 = get_group_id(1); @@ -714,7 +714,7 @@ kernel void kernel_rope_vision_f16( src0 = (global void*)((global char*)src0 + offset0); src1 = (global int*)((global char*)src1 + offset1); src2 = (global float*)((global char*)src2 + offset2); - dst = (global float*)((global char*)dst + offsetd); + dst = (global half*)((global char*)dst + offsetd); int i3 = get_group_id(2); int i2 = get_group_id(1);