[clang] [CUDA][Win32] Add `fma(long double,..)` to math forward declares. (PR #73756)

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 4 10:41:29 PST 2023


================
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double);
 __DEVICE__ float floor(float);
 __DEVICE__ double fma(double, double, double);
 __DEVICE__ float fma(float, float, float);
+#ifdef _MSC_VER
+__DEVICE__ long double fma(long double, long double, long double);
----------------
Artem-B wrote:

CUDA does not provide GPU-side `fma` for long double.

This declaration probably warrants a comment about this, because whoever ends up using it on a GPU will be surprised when their code compiles, but fails somewhere in ptxas, which will look like a compiler crash.


https://github.com/llvm/llvm-project/pull/73756


More information about the cfe-commits mailing list