https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/188245
>From baaaa201ddf5efd33e8ef6712718c2d170ae94fe Mon Sep 17 00:00:00 2001 From: Matt Arsenault <[email protected]> Date: Tue, 24 Mar 2026 14:25:55 +0100 Subject: [PATCH] libclc: Force assuming fast float fma for AMDGPU Currently the build uses the default dummy target, which assumes FMA is slow. Force this to assume fast fma, which is the case on any remotely new hardware. In the future if we want better support for older targets, there should be a separate build of the math functions for the slow fma case. --- libclc/clc/include/clc/math/math.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libclc/clc/include/clc/math/math.h b/libclc/clc/include/clc/math/math.h index 22ed3f9defcbe..950e8055c98c9 100644 --- a/libclc/clc/include/clc/math/math.h +++ b/libclc/clc/include/clc/math/math.h @@ -30,7 +30,9 @@ #define __CLC_FAST_FMA_F16 0 #endif -#ifdef FP_FAST_FMAF +// TODO: Stop forcing this for AMDGPU, and use a separate build for slow-fma +// case. +#if defined(FP_FAST_FMAF) || defined(__AMDGPU__) #define __CLC_FAST_FMA_F32 1 #else #define __CLC_FAST_FMA_F32 0 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
