https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH 1/3] libclc: erfc: fix fp32 implementation
On some implementat
@@ -131,7 +131,8 @@ _CLC_OVERLOAD _CLC_DEF float erfc(float x) {
float ret = 0.0f;
float z = as_float(ix & 0xf000);
-float r = exp(mad(-z, z, -0.5625f)) * exp(mad(z - absx, z + absx, q));
+float r = exp(-z * z) * exp(mad(z - absx, z + absx, q));
+r *= 0
https://github.com/frasercrmck closed
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
karolherbst wrote:
It does, thank you!
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjodinchr created
https://github.com/llvm/llvm-project/pull/132390
On some implementation, the current implementation lead to slight accuracy
issues.
While the maths behing this implementation is correct, it does not take into
account the accumulation of errors coming from o
https://github.com/rjodinchr edited
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjodinchr wrote:
@karolherbst could you try this patch to see if it fixes rusticl as well?
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/rjodinchr edited
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/frasercrmck approved this pull request.
LGTM.
It might be worth re-titling the PR to mention FTZ mode?
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
rjodinchr wrote:
> It might be worth re-titling the PR to mention FTZ mode?
Sure, I'm not sure what you have in mind, but feel free to do it when
submitting it upstream (I cannot do it myself)
https://github.com/llvm/llvm-project/pull/132390
___
cfe-
rjodinchr wrote:
> Though this does seem to be an improvement so it might be worth merging
> anyway. As you say, it fixes things for you and for mesa. Are you both
> testing on FTZ implementations, by any chance?
Yes, default run of the CTS using clvk ends up running with FTZ.
https://github.
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH 1/2] libclc: erfc: fix fp32 implementation
On some implementat
@@ -130,7 +130,8 @@ _CLC_OVERLOAD _CLC_DEF float erf(float x) {
// |x| < 6
float z = as_float(ix & 0xf000);
-float r = exp(mad(-z, z, -0.5625f)) * exp(mad(z-absx, z+absx, q));
+float r = exp(-z * z) * exp(mad(z - absx, z + absx, q));
+r *= 0x1.23ba94p-1
https://github.com/frasercrmck edited
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/frasercrmck commented:
Nice one!
This appears only to fix the precision issues I see when in FTZ mode. Without
FTZ mode, I still see, e.g.,
```
1:erfc fp32 ...
ERROR: erfc: -24.674929 ulp error at 0x1.3b8p+3 (0x411dc000): *0x1.9p-145 vs.
0x0p+0
ERR
https://github.com/rjodinchr updated
https://github.com/llvm/llvm-project/pull/132390
>From 95eeda421b4cdc468f828d36146d609e80d195d9 Mon Sep 17 00:00:00 2001
From: Romaric Jodin
Date: Fri, 21 Mar 2025 13:51:41 +0100
Subject: [PATCH] libclc: erfc: fix fp32 implementation
On some implementation,
rjodinchr wrote:
@frasercrmck could you review please?
https://github.com/llvm/llvm-project/pull/132390
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
17 matches
Mail list logo