From 48ba7c43a19412d70e06fe79474f8b003228dc33 Mon Sep 17 00:00:00 2001 From: Donato Capitella Date: Wed, 12 Nov 2025 10:42:37 +0000 Subject: [PATCH] Add HIP shuffle compatibility shim header for gfx1151 --- ggml/src/ggml-cuda/hip_shfl_fix.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ggml/src/ggml-cuda/hip_shfl_fix.h diff --git a/ggml/src/ggml-cuda/hip_shfl_fix.h b/ggml/src/ggml-cuda/hip_shfl_fix.h new file mode 100644 index 0000000..90bff1a --- /dev/null +++ b/ggml/src/ggml-cuda/hip_shfl_fix.h @@ -0,0 +1,14 @@ +#ifndef HIP_SHFL_FIX_H +#define HIP_SHFL_FIX_H +#ifdef __HIP_PLATFORM_AMD__ + #ifndef __shfl_sync + #define __shfl_sync(mask,var,srcLane,width) __shfl((var),(srcLane),(width)) + #endif + #ifndef __shfl_up_sync + #define __shfl_up_sync(mask,var,delta,width) __shfl_up((var),(delta),(width)) + #endif + #ifndef __shfl_xor_sync + #define __shfl_xor_sync(mask,var,laneMask,width) __shfl_xor((var),(laneMask),(width)) + #endif +#endif +#endif